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 knowledge base 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 reborn

bkmr - crate of the week 482 - is a fast, feature-rich command-line tool that handles bookmarks, snippets, markdown files, scripts and more and adds powerful search.

Organize, find, and apply your 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
  • Semantic embeddings for local offline search (no API keys needed)

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

  • bookmarks, links short snippets go into the database
  • large markdown documents or scripts stay where they are and references go into database

Both options provide the full benefits of bkmr.

Why bkmr?

  • Developer-focused: Integrates seamlessly with your workflow and toolchain
  • 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
  • Agent-friendly: JSON output, non-interactive mode, and _mem_ system tag for AI agent memory
  • 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 for all IDEs

NEW: Agent Memory

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 ready-made 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.4.1

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

bkmr-7.4.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.4.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.4.1.tar.gz.

File metadata

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

File hashes

Hashes for bkmr-7.4.1.tar.gz
Algorithm Hash digest
SHA256 4ff5f73b301eddf56948f4b67a1f06a44928aeabf45f6f7e606efee1e5bc9b52
MD5 59ee332b08b04483b3395a25a57777d4
BLAKE2b-256 200e7a0b12f4d5c56ddc10b3359c0ca0032e854e75b9bf391386d6027237c0b4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp313-cp313-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 3c1e7c7edda728ec530f91e975d8fa6581de881ad66904cedd4085fb09dd16f5
MD5 d145a344ed1de938c47f688cfc233e80
BLAKE2b-256 4de9a3b17c8e42db6d6cae19bed6f199adec32a2219396fe5f82a88873602c2e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a96643ce076d484a1f8524e1f387d88aac85c33ee58d4d7b154c9c0f1bb2298f
MD5 e3df05eae0bb0900f905e02336f0f0b6
BLAKE2b-256 8a37a3dfe9bcfb5aa1d083d622ae2ae7878fce80b24c9e605c28c90d8df7e564

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp312-cp312-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 1f5e7eb50635244bd35f76e1b1550945ab6182bc1e9df2fd93f990cb91e5f267
MD5 0c5544f7b4a947a2734c52eda59a3a18
BLAKE2b-256 346f7a2fc735bdbad12d6cd104e15cbd324f335eb21d35514eff6e74ae1efcb5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 06ea85d3f871ea7c21fce229854015481bff9c159aa9613887f98b74a0b929ee
MD5 a9afd9a00ca777abe0414182b184a53e
BLAKE2b-256 d9a21e69ec60d25bb3612237e57706cabb32df7d0bd05227ae5399bb352bb5e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp311-cp311-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 d0443ef3713baf1c9eae4b23d870763d5138db2a710537ceb7a378b37cbb8f1a
MD5 be17750b90330acfeee4ea96282a48dd
BLAKE2b-256 cc073481390d10fcbeeda2c3aacbcd1e34736c89b18496daf5a4f017cadfcf0a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93d9430984a42cdd37bce673afdd72bac017578fa03c80ef1dce73bb6dfb5936
MD5 57be1be201f93e76924ad9ddc862f37e
BLAKE2b-256 eccec368730b602b422a2b35d2ced67886fcc924a14df7e48fabccbfc17a93f3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp310-cp310-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 e3d6d7242b6db59950e43cddd5ee6f7a54b4839babed3aceddbb4d137725e63f
MD5 ddb2f4205f94256b5118b94f728a59f8
BLAKE2b-256 d545831c1522457b0910db6c0064d4e22b57315d2653b0ddc87fbff6087280f5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for bkmr-7.4.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 690753fa76e93ccf93667167b36a9e0fd4c0e0acfc15f3855c42dd75063439ec
MD5 3c0daf1d7be807d7f8e022fc2e0b90a7
BLAKE2b-256 5ee9607c858a5bbf7f80ac0bd68e764aef7d44439e33f7197fbf7d179d048f8a

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