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

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.1.tar.gz (421.9 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.1-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.1-cp313-cp313-macosx_11_0_arm64.whl (14.0 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

bkmr-7.6.1-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.1-cp312-cp312-macosx_11_0_arm64.whl (14.0 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

bkmr-7.6.1-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.1-cp311-cp311-macosx_11_0_arm64.whl (14.0 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

bkmr-7.6.1-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.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for bkmr-7.6.1.tar.gz
Algorithm Hash digest
SHA256 fe4390dd42879b40d7e02e5d4d1d6210777e7b210e7a04b287b3be4fd2af780a
MD5 a740478313053254ee09a505954164eb
BLAKE2b-256 d3864ab4ca142ac3f20614969c27af7b6ebac7421a7a4cc2544a7c2907c16d2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 4968ba5724195a5a3144396a3ae782620f8f6339240f6763508dc943280caef7
MD5 462fc1a84044ecdb2d6cf2c55ce6470a
BLAKE2b-256 09bfbc108097634584d19b74b1f935844dac11e59665415073774f43dbb7fb41

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 73fa7e9b21b2d432f7471eab77e3901c78559a1b20b661b851305e13a3d370ec
MD5 7c6d463f5a86782942450e15f92cb05c
BLAKE2b-256 78f90bb19f5a9230cab510f652b368e5c2c492b2406bc50ce124ec2114189b1b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a71e6ef4412bd4d347c6ec259308406f7f5507f7ac87e6de775dbad75ed4ad43
MD5 efa987b89ba4bc7e9ff6ef30ab3e4b9d
BLAKE2b-256 19e0d8d9a3a319bc12e89bc87303753acf44558c14f8dfb410ecc52312bc3da0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4a4b2633bae8b0a01a96e56a632b85e5636c5be7e52d72873826aa8e4f67fee1
MD5 63556823ece642da4e94dd65e53cdc99
BLAKE2b-256 1984e0253d1c98cb90bb373404f4ea033799a4869a29ff539e1dabe9a0e433e1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 87e70010b8f474e21fe9ff4de7b0f3a618ff91edabc3b3d7dac03dbb11b13518
MD5 ac7358fd0d4dc4ab54c134b456273eb5
BLAKE2b-256 a1f599018faf49b08785a4a0a713c5e33dc12f24d9a6c801de94071af8d8849a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b99c2e20cfb7680f98c51cd0897b1f03538dc2a67c7caf3183d06c3db0d27c7e
MD5 277eb897a13562225ee9bb74df5615fb
BLAKE2b-256 144dc3b38809f85cf4a2d7b99ff339d960811d1e5cd224ef00874c5c74750377

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 1d3ad6612397719740a5b1e617230c3cdde0899ebb88b94037af04373d478095
MD5 6750081bd7932a2f9fee4e16ff2ccf7d
BLAKE2b-256 29ce0230ca864df80399de223e00aad24d93db1942f77d63334045fb7f7c4779

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 70457f3773a7bd6449237a45cb973cefb2cb30fb8f341ae9c1b8fb2899d69593
MD5 e4333e8d704cb25243f77f4e6bab27c7
BLAKE2b-256 cd386e99a8e3cfb6b3efeef4d93ebfdd1c3c2e122057c82645ebf765e19389d6

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