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

A local-first memory for humans and AI agents. 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, etc, searchable, executable.

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

Centralize your data in bkmr's database (add) or keep it in your filesystem (import-files) (see).

  • e.g. memories, bookmarks, links, snippets in database
  • large documents or scripts in filesystem, references go into database

Both options provide the full management capability of bkmr.

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: Use bkmr lsp for VS Code, Vim, Emacs - automatic snippet completion with language-aware filtering
  • Neovim Plugin: Visual interface with Telescope integration and zero configuration
  • IntelliJ Plugin: JetBrains Marketplace plugin

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 complete memory protocol with taxonomy, deduplication, and session workflows.

See Agent Integration for complete documentation.

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

Bookmarks: bookmarks

Snippets: fzf-snippets

Demos:

Getting Started

Installation

# Via cargo
cargo install bkmr

# Via pip/pipx/uv
pip install bkmr

# Via brew
brew install bkmr

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
set-embeddable Mark bookmarks for semantic search embedding
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.5.0

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.5.0.tar.gz (421.0 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.5.0-cp313-cp313-manylinux_2_39_x86_64.whl (15.9 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11manylinux: glibc 2.39+ x86-64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10manylinux: glibc 2.39+ x86-64

bkmr-7.5.0-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.5.0.tar.gz.

File metadata

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

File hashes

Hashes for bkmr-7.5.0.tar.gz
Algorithm Hash digest
SHA256 76e1e1d7f6e42682c02fdb4e4eb76135ffa6a673b4fb05279e9d6b05be536993
MD5 6fb09a59b788342cb581b828117d4078
BLAKE2b-256 178ff6aa0dc980f52b6aefba475f9ff9b61c509c0bd51cbfb3c1f2ee05670a0f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 148144f87a43c2bd0f632c682fd824bf4747b27e4e960a91cc627b7a5a938bee
MD5 a1b37f4795e3a54999a052f16ecfe5ef
BLAKE2b-256 fc805be119a7300e293e602b7b62e388c317dfdd79a6fc802a5590d7b16f71be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 64026d8b50d544ed896994f346bf977b886c15b9d32bdf5a438efe8b5f035911
MD5 75fdbd7fae91fa03699d78f82848adb3
BLAKE2b-256 aef6cf32ada94dd57336f2e38bf587f43accfa3bd3391bd286b133b2b1df26dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 3643de1e5904b6e055f47b1422e0d747f7c8b7a1bdf8149a1ced429abad403a8
MD5 f7655233ef2e62a06bae1d97ed653e95
BLAKE2b-256 9a91dea6fc19e736a7d36d33cb73fbb2b1a1ebbe947ac522cf78964479c35b8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2171ed02c4d955170d9d88716b5cfb604ebd3b29a87283e75e4247cc449f8d1b
MD5 41076d73781b449f2c008e781974cc1e
BLAKE2b-256 2981278384c4c2112833c84a39f1c3e03c1b8cec69c90d397a6f6c8287ec9218

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 829efac18a81faaea91788ad1ddf33122b747fde9b3461fb0947bcad75c8116d
MD5 d53844a795a64c45cd46a8eac43f47ce
BLAKE2b-256 9e11ae0ce9b556ca1d861e0c482ca1f78869afce1b1c957076e51033741b8989

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 191cfeae506844cb40c17159e9aa3a4c4019403ec8c98e51800d52325f6e8462
MD5 3ff188bb2f9ed97158550b63a0fe42b3
BLAKE2b-256 b847505cc883ac2202097cdd77914731b4c294bf6d42cbc02cbc527cd0498ccc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a94b18ae6ad8f69ab1d4ab789be580e815a54ea70bb7f16acacb9209f529ade1
MD5 a5a2792f8da71cbf29ad1da022d6b97b
BLAKE2b-256 d5ef069a00305b47c3e311d7f4f5633db1519e3d2f50c0a4498a6d14588b2772

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.5.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b640f4d02fbe013143db1dc59646240380b5b41bd5091b050fdb95e754500a82
MD5 d397322a559e9fe1250a1ee860426306
BLAKE2b-256 e2dfe0a48762dd0d9801860b4232c5b10dfc9c46e2dcc2aeeca6a5942e4999e3

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