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.3

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

bkmr-7.6.3-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.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for bkmr-7.6.3.tar.gz
Algorithm Hash digest
SHA256 1500fa47b72e68f040a90e30ef15051a7ce61813fa2c9ee5f74c02161cbf6f41
MD5 2d5cb8487244760f20361d5e4d8346e4
BLAKE2b-256 711fc3a7780f4f3c58926a7109a8f6c4212ae615477c517c9eb26b3471b7149a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 e071c5ab9008fc7ec051a3d226f4e0041c5cc6f889b8b91c6001377bedb151a4
MD5 7991549569b3bc592859f456646fbead
BLAKE2b-256 4af2d82c2f528e30b51f3372ce363cdb588ba0c00fba3a6aaf6c00e180d4dc30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2721df7ba32df669a4e65314708dea6041c3a4010c3412719aa02873ed54ee6b
MD5 bf571e18f98136bc1a622fefaeac2ecb
BLAKE2b-256 0a0a8089e8fb8ec542523c6b9eb7fba3e7279bc662c8a23c7eaca0b23282ece6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 831ee391e0d62b817d37a168aeb5bfac803cdabcf693ffdfbcc78437fb961b81
MD5 2465ad31be51213e9f8ff43c1cb9611f
BLAKE2b-256 62cc7df2dba69506c04bff47d67dc680768d3a14a3a20df93dd8e60d70786c38

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f1f54d2a50bfbbf5407e2874a139261953272a6d27eacfd677e842142bb46d59
MD5 771edcd196ca4ac351fcea1bf2e378c3
BLAKE2b-256 4ff59a40ae223bb056403e3038cec22cc0780a9b85ee52b9e9be8c0d87d82188

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 e21c6f6b412d3c04005b37f1b1c6c951e6cee16254a1380a37dfcc6c050d7fe4
MD5 83e9de506b61d35e66e92371c4fadfed
BLAKE2b-256 1fdb6cdf396495a027e2864ea6e4d136d519ab54c2d10953fe8faad0432f70f9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 194d495e66a2abd85141ecba7fc8906ce6e773efd14ddea7d87c38ed0383eef6
MD5 daf1c366048144d0ac32d61259071cc6
BLAKE2b-256 dc4d2c19cf897935c1eeae049e97052a912c5ebed07fd62a625c94bb58a54a0b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 8def3346193abbdbeba3c4b2b3f5a76f4e67bb3e8b69f07d4160ffce323b5e40
MD5 8416720f100f09499c7c728291797eda
BLAKE2b-256 05cf5228943483e192dc0699b6b2b003ef95cc80d4390f13f314997903511e09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0857e1d9409851c524cd5d1541942913ff4bb169d6434cbe36f21c161b014c2a
MD5 fed1d9223a044e7ca27b1477e07bd6d5
BLAKE2b-256 d50f7b923521da5e701b006093a03510f618fa67260d29ca899d94e9abfa9280

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