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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

bkmr-7.6.5-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.5-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.5.tar.gz.

File metadata

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

File hashes

Hashes for bkmr-7.6.5.tar.gz
Algorithm Hash digest
SHA256 82ec174e5b4d57f2e96d541a410b99ea507505c08f32b78997fd256e9a7163ec
MD5 9b3c50811020fdeaf755810f1d8558d6
BLAKE2b-256 45d2a89933d45fd9333bc92b6a97261f335e8de07e728bb90a93a1831d146f39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 abe9a80c842352c47ad351f64a0943d1dfb12f9715342de645455ba7e9432f4c
MD5 fa04968e8810689edfff5e7e97485f01
BLAKE2b-256 779e136bb62f615c73fae04e32d58b0718b092727b984afbd285505616d3d251

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8a7584ac39a6d362e1fbcf24816c8af7c041194f0c56311464b84cfcf24dfb3f
MD5 d604d8d23df29110c6f80b6b65d6fd65
BLAKE2b-256 4c0feb7ca21e794ef458cce27d9375b7eb0e750ef5eced3ad31db3b9dc4b2d00

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 8f1f331ae9fda50947edb5b37e59f315e1c34f96ed1c858ec8633ec76f29ce8a
MD5 d65072871475579b43c6096ba3335881
BLAKE2b-256 c6185cf5d05b34a290b6f7e337e75a445b0946be7983df02040daa2be7eb74d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7cf3d0bf2dc57207cce2649d716505f183f64b139fd638c6d76539a1205fa07d
MD5 51ce4b91d6a0465e6fef386fe601eb80
BLAKE2b-256 e9a71432c8f4e48863030ca830d1ca7381bbbac6959b4e522f24d0158a8ef333

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d8d543f5999b5b57eff1a664a34df4df167acfd4b41ec21d7ae456cdc12dfa28
MD5 f45a5b1d0610afedec922098df0c5f15
BLAKE2b-256 5f63e35f25ee694d3b64dbfc43f748c9a2901fe4def4e0e6c8c5f6317ad2f584

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cf4f664ece16adba2579abf0c6d770ad2e2c41c31ea19221b7f3a43fcee35aa7
MD5 fe0847c8d70f8c9452e8cf0b79e404ef
BLAKE2b-256 1689e728217c776ae5093557013f55e99917957a975b6d2673bf2cec2e80663e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 5bfa0bc777082c0bb8652609fb4c3274bf080601e4a05b36fb1638f3e6d60e33
MD5 7d0f7fd51c678f59dead7429a1ce2d39
BLAKE2b-256 ce61b9119f0f47ebc5ddaa656d6088cec00607d041f61189e60c5a145df3c686

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.6.5-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2a3b179d363d8817f33aa1886c16e44b5126f546c1d8e5948ed4253edfbed1bb
MD5 f33cdb60f77e668639451d741434a1e5
BLAKE2b-256 9544a0d8aea05cddd3d2f36c1f32b2a863b85781e892d18767361300b93a09be

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