bkmr
Combine any snippet (code, urls, markdown, text) with powerful search, interpolation and execution.
Beyond Bookmarks and Snippets: A CLI Knowledge Management System
bkmr - selected crate of the week 482 - is a fast, feature-rich command-line tool that extends bookmark management, snippet handling, markdown rendering, script execution and more.
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 AI-powered search
Centralize your data in bkmr's database (add) or keep it in your filesystem
(import-files) (see).
Example:
- bookmarks, links short snippets go into the database
- large markdown documents or scripts stay where they are and only references go into DB
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: Local database, no cloud dependencies unless enabled
- Fast: 20x faster than similar Python tools
NEW: Editor Integrations!
- Built-in LSP server: Use
bkmr lspfor 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
See Editor Integration for complete documentation.
Quick Examples
# Quick fuzzy search with interactive selection
# Add URL with automatic metadata extraction
# Store code snippet
# Shell script with interactive execution
# Render markdown in browser with TOC
# Import files with frontmatter
# AI-powered semantic search
Screenshots
Bookmarks:
Snippets:
Demos:
Getting Started
Installation
# Via cargo
# Via pip/pipx/uv
# Via brew
See Installation Guide for detailed instructions and troubleshooting.
Initial Setup
# Generate configuration
# Create database
# Optional: Configure location
First Use
# Add your first bookmark
# Search and find
# Interactive fuzzy search
Quick Start Guide: See the Quick Start for a 5-minute tutorial.
Command Reference
| Command | Description |
|---|---|
search |
Search across all content with full-text and tag filtering |
sem-search |
AI-powered semantic search using OpenAI embeddings |
add |
Add new content (URLs, snippets, files, shell commands, etc.) |
open |
Launch or interact with stored items (supports script arguments) |
edit |
Smart editing: auto-detects file-imported bookmarks |
import-files |
Import files/directories with frontmatter parsing |
tags |
View and manage your tag taxonomy |
set-embeddable |
Configure items for semantic search |
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 then execute | _shell_ |
| Environment Variables | Print for sourcing in shell | _env_ |
| Markdown | Render in browser with TOC | _md_ |
| Text Documents | Copy to clipboard | _imported_ |
| Local Files | Open with default application | (none) |
Learn more: Content Types | Core Concepts
Documentation
Comprehensive documentation is available in the bkmr Wiki:
Getting Started
- Home - Wiki overview and navigation
- Quick Start - 5-minute introduction
- Installation - Installation methods and troubleshooting
- Core Concepts - Understanding tags, system tags, and bookmarks
Core Features
- Basic Usage - Common daily operations
- Search and Discovery - FTS, tags, fuzzy finder, semantic search
- Content Types - URLs, snippets, shell scripts, markdown, environment variables
- Shell Scripts - Interactive execution and shell function stubs
Advanced Topics
- Configuration - Complete configuration reference
- Template Interpolation - Jinja2 dynamic content
- File Import and Editing - Frontmatter, base paths, smart editing
- Semantic Search - OpenAI-powered AI search
- Editor Integration - LSP server and editor plugins
- Advanced Workflows - Power user techniques
Reference
- Troubleshooting - Common issues and solutions
- Development - Contributing and building from source
Editor Integrations
Access your snippets directly within your editor without context switching.
Neovim Plugin (Recommended)
bkmr-nvim provides visual interface with zero configuration.
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
# Disable template interpolation if needed
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
Wayland Support: Native Wayland clipboard support for modern Linux desktops.
- Supported compositors: Hyprland, Sway, and other compositors supporting
wlr-data-control-unstable-v1 - Automatic detection: Falls back to X11/XWayland if unavailable
- Compatibility: Check your compositor at wayland.app
Development
Building from Source
Running Tests
IMPORTANT: All tests must be run single-threaded:
# Run tests (REQUIRED: single-threaded)
# Or use Makefile
Why single-threaded? Tests share 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:
- GitHub: https://github.com/sysid/bkmr
- Issues: https://github.com/sysid/bkmr/issues
- Wiki: https://github.com/sysid/bkmr/wiki
- Discussions: https://github.com/sysid/bkmr/discussions
For developers: Remember to always run tests with --test-threads=1 to avoid database conflicts.