Skip to main content

Super fast bookmark manager with semantic full text search'

Project description

rsenv logo

Crates.io Crates.io Docs.rs Build Status

Store anything, find it by meaning, act on it instantly.

Beyond Bookmarks and Snippets: Knowledge Management for Humans and Agents

bkmr - crate of the week 482 - memories, bookmarks, snippets, text - search it, invoke it!

Organize, find, and apply various content types:

  • Web URLs with automatic metadata extraction
  • Code snippets for quick access and reuse
  • Shell commands with immediate execution capabilities
  • Markdown documents with live rendering, incl. TOC
  • Plain text with Jinja template interpolation
  • Local files and directories integration

Why bkmr?

  • Developer- and agent-focused: Integrates seamlessly with workflow and toolchain
  • Agent-friendly: JSON output, non-interactive mode, and _mem_ system tag for AI agent memory
  • Multifunctional: Handles many content types with context-aware actions
  • Intelligent: Full-text and semantic search capabilities
  • Privacy-focused: Fully local — database, embeddings, and search all run offline
  • Fast: 20x faster than similar Python tools
  • Automation-ready: Programmatic CLI with --json, --np, --stdout for pipelines and integrations
  • Editor Integration: Built-in LSP server

Agent Memory and Skill

Persistent long-term memory for AI agents. The _mem_ system tag and hsearch (hybrid FTS + semantic search) create a complete read/write memory interface:

# Agent stores memory:
bkmr add "Prod DB is PostgreSQL 15 on port 5433" fact,database \
  --title "Production database config" -t mem --no-web

# Agent queries memories with natural language (hybrid search)
bkmr hsearch "database configuration" -t _mem_ --json --np

# All output is structured JSON — designed for programmatic consumption

Use skill/bkmr-memory. It defines a comprehensive memory protocol with taxonomy, deduplication, and session workflows.

See Agent Integration.

Quick Examples

# Quick fuzzy search with interactive selection
bkmr search --fzf

# Add URL with automatic metadata extraction
bkmr add https://example.com tag1,tag2

# Store code snippet
bkmr add "SELECT * FROM users" sql,_snip_ --title "User Query"

# Shell script with interactive execution
bkmr add "#!/bin/bash\necho 'Hello'" utils,_shell_ --title "Greeting"

# Render markdown in browser with TOC
bkmr add "# Notes\n## Section 1" docs,_md_ --title "Project Notes"

# Import files with frontmatter
bkmr import-files ~/scripts/ --base-path SCRIPTS_HOME

# Local semantic search (no API keys needed)
bkmr sem-search "containerized application security"

# Agent memory: store and retrieve knowledge
bkmr add "Prod DB on port 5433" fact,database --title "Prod DB config" -t mem --no-web
bkmr hsearch "database config" -t _mem_ --json --np

Screenshots

General Usage:

bkmr demo

Fuzzy Search with FZF:

fzf demo

Agent Memory:

agent demo

Detailed walkthroughs: Overview | Getting Started | Search and Filter | Edit and Update | Tag Management

Getting Started

Installation

# Via cargo
cargo install bkmr

# Via pip/pipx/uv
pip install bkmr

# Via brew
brew install bkmr
export ORT_DYLIB_PATH=/opt/homebrew/lib/libonnxruntime.dylib

See Installation Guide for detailed instructions and troubleshooting.

Initial Setup

# Generate configuration
bkmr --generate-config > ~/.config/bkmr/config.toml

# Create database
bkmr create-db ~/.config/bkmr/bkmr.db

# Optional: Configure location
export BKMR_DB_URL=~/path/to/db

First Use

# Add your first bookmark
bkmr add https://github.com/yourusername/yourrepo github,project

# Search and find
bkmr search github

# Interactive fuzzy search
bkmr search --fzf

Quick Start Guide: See the Quick Start for a 5-minute tutorial.

Command Reference

Command Description
search Full-text search with tag filtering, FZF, JSON output
hsearch Hybrid search: FTS + semantic with RRF fusion
sem-search Semantic search using local embeddings (offline, no API keys)
add Add bookmarks (URLs, snippets, scripts, markdown, env vars)
open Smart action dispatch based on content type
edit Edit bookmarks (smart: opens source file for imports)
update Modify tags and custom openers
delete Delete bookmarks by ID
show Display bookmark details
import-files Import files/directories with frontmatter parsing
tags View tag taxonomy with usage counts
info Show configuration, database path, embedding status
backfill Generate missing embeddings
clear-embeddings Clear all embeddings and content hashes
lsp Start LSP server for editor snippet completion
completion Generate shell completions (bash, zsh, fish)
surprise Open random URL bookmarks

Complete command documentation: See Basic Usage for detailed examples.

Smart Content Actions

bkmr intelligently handles different content types with appropriate actions:

Content Type Default Action System Tag
URLs Open in browser (none)
Snippets Copy to clipboard _snip_
Shell Scripts Interactive edit + execute _shell_
Markdown Render in browser with TOC _md_
Environment Variables Print for eval/source _env_
Text Documents Copy to clipboard _imported_
Agent Memory Display to stdout _mem_

Rule: A bookmark can have at most one system tag. Local files without a system tag open with the default application.

Learn more: Content Types | Core Concepts

Documentation

Comprehensive documentation is available in the bkmr Wiki:

Getting Started

Core Features

Advanced Topics

Reference

Editor Integrations

Access your snippets directly within your editor without context switching.

Neovim Plugin (Recommended)

bkmr-nvim provides visual interface with zero configuration.

{
  "sysid/bkmr-nvim",
  dependencies = { "nvim-lua/plenary.nvim" },
  config = function()
    require("bkmr").setup() -- Zero config required!
  end,
}

Features: Visual snippet browser, in-editor editing, automatic LSP setup, custom commands

Built-in LSP Server

Compatible with VS Code, Vim, Emacs, Sublime, and any LSP-compatible editor.

# Start LSP server
bkmr lsp

# Disable template interpolation if needed
bkmr lsp --no-interpolation

Features: Automatic completion, language-aware filtering, universal snippets, template interpolation

IntelliJ Platform Plugin

bkmr-intellij-plugin for all JetBrains IDEs.

Features: Seamless LSP integration, Tab navigation, works in IntelliJ IDEA, PyCharm, WebStorm, CLion, RustRover, and all JetBrains IDEs

Complete documentation: Editor Integration

Platform Compatibility

Linux Clipboard: Uses external tools for reliable clipboard persistence.

  • Wayland: Uses wl-copy from wl-clipboard package
  • X11: Uses xclip (preferred) or xsel as fallback
  • Auto-detection: Detects display server via WAYLAND_DISPLAY environment variable

Development

Building from Source

git clone https://github.com/sysid/bkmr.git
cd bkmr
cargo build --release

Running Tests

IMPORTANT: All tests must be run single-threaded:

# Run tests (REQUIRED: single-threaded)
cargo test -- --test-threads=1

# Or use Makefile
make test

Why single-threaded? Tests share a SQLite database and environment variables. Parallel execution causes race conditions.

See Development for complete contributor guide.

Community and Contributions

We welcome contributions! Please check our Contributing Guidelines to get started.

Resources:

Project details


Release history Release notifications | RSS feed

This version

7.6.4

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bkmr-7.6.4.tar.gz (422.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

bkmr-7.6.4-cp313-cp313-manylinux_2_39_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

bkmr-7.6.4-cp313-cp313-macosx_11_0_arm64.whl (14.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

bkmr-7.6.4-cp312-cp312-manylinux_2_39_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

bkmr-7.6.4-cp312-cp312-macosx_11_0_arm64.whl (14.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

bkmr-7.6.4-cp311-cp311-manylinux_2_39_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

bkmr-7.6.4-cp311-cp311-macosx_11_0_arm64.whl (14.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

bkmr-7.6.4-cp310-cp310-manylinux_2_39_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

bkmr-7.6.4-cp310-cp310-macosx_11_0_arm64.whl (14.0 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file bkmr-7.6.4.tar.gz.

File metadata

  • Download URL: bkmr-7.6.4.tar.gz
  • Upload date:
  • Size: 422.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.13.1

File hashes

Hashes for bkmr-7.6.4.tar.gz
Algorithm Hash digest
SHA256 088a50b78d39e2bb02d616804aadbffdb74f2f298da2713cdaf36948074e34b9
MD5 fc959264e47ec954e7501d81d71cc2c9
BLAKE2b-256 05f52a35d3cbbaf39af1a97fda3a75bcc3f185e372829a57a8d2722a480f001b

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp313-cp313-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 6039196ea2b0fa213a79c58394f55591f6c95c5a9ec1b851988d5b6f953082f1
MD5 321f74a2ad160f372ba5f15968dacdb4
BLAKE2b-256 c0c9178ddaf6a3d5a19ebb8a827e815e3fcf32d00500e3871d6ff6a21d2df0a1

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10244fa3ee74f9fcb5df9623b00103e1ad31cca63a7cd06a545182791356ad6c
MD5 f990c4c5db2cf563a90527bbee09bbf5
BLAKE2b-256 ac8718d20cd8ca88533fe7d6ba4ac75b96e7bd6f1300ae328feb1fa585225430

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp312-cp312-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 6cd4831682ef95029de4df282a46d1371267b05f90cd773ca9ef87d7c1f7170c
MD5 20adb7c62e23fabb12c7ad524812ecb5
BLAKE2b-256 994ac4c82183715905a5d5dd9b9d726b4b995dc52902ecc134aaaaaab54c6fe4

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d8285f5544bedb8fd1c8235914692f0075627562383b76e3e854d3499d51c4ca
MD5 d18ac53989ca5f544f11d98daf920b8e
BLAKE2b-256 09bfd3ece27a65160180ed21203e927712b209dfaef8a7d693103ec4aefd85df

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp311-cp311-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 7049405f44a0960f37657167c3d1094770c6318a4a4740230946d1839f50d617
MD5 919603c72e6f5bb543129bb404dbab7f
BLAKE2b-256 321dc313629ec7418b881fc1654d7290f0aa6e68fc26fcdb49e2fce6ba18e6d3

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9fcece14c10869a7b062233a7d77c3e4fe8bfaa2cca9a926621cdd43148a015d
MD5 e113f55344e2cae38de2c1aca5dde093
BLAKE2b-256 195d335612011c730956c6784631162cc1e094c80606fb73e0ecb661c8a747e4

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp310-cp310-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a88a8a225b100965b0b9a7bda4743970ef21f45fdb9c16eb4a1c9a2364be3ab6
MD5 60c6acc9bbd7f0d0b583a1ab4e014cb3
BLAKE2b-256 1462f157407d666b789d5e75f41037c7af832b1932f37affbcd9caa1c1c7f522

See more details on using hashes here.

File details

Details for the file bkmr-7.6.4-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for bkmr-7.6.4-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8216b4fd7a466983d38c79092801329e65f80f2fc00aa18a1c12f604cf3d8b10
MD5 bf08f57195c8fe6eb5d2de3e954138ff
BLAKE2b-256 619fe42ee9ba7f67d67d24e7857483fe0e7cc75c11edadb258b608913d6efb74

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page