bkmr reborn
Streamlining Developer Productivity
Bookmark, snippet, any-text manager are addressing the same fundamental problem: Store it, find it, act on it.
Fast, seamlessly.
A software developer knows the struggle: You’re deep into concentration when suddenly you need that specific command, website, or snippet you used weeks ago.
What should have been a quick retrieval turns into a disruptive search.
Traditional bookmark managers or snippet tools individually address this issue but rarely provide a holistic solution.
Understanding the Challenge
Developers face a common set of challenges when working with information:
- Fragmentation: Information scattered across bookmarks, notes, documentation, and code snippets
- Context Switching: Productivity loss from navigating between different tools and interfaces
- Retrieval Friction: Difficulty in quickly finding the right information at the moment of need
- Action Delay: The gap between finding information and applying it in the current task
At its core, the problem isn’t just storage or retrieval — it’s the friction caused by context switching. Each interruption, even brief, pulls you out of the productive flow state, disrupting your thought process.
Knowledge management tools today typically focus narrowly, handling either bookmarks, snippets, or documents independently, forcing developers into multiple contexts. A bookmark manager might store useful URLs but lacks actionable snippets or shell commands. Snippet tools might be great for repetitive code but ignore crucial documentation or bookmarked references.
Ultimately, there is a common underlying structure: each managed entity has a title, description, tags or classifiers, and some payload — whether it’s a URL, a snippet of code, or a shell command — that you want to act upon quickly.
bkmr’s Unified Data Model
bkmr’s core insight is recognizing that diverse knowledge types share this common underlying structure:
- Content: The payload that delivers value (URL, code, command, note)
- Metadata: Information that describes the content (title, description)
- Classification: Methods for organizing and retrieving (tags, categories)
- Action: What to do with the content when found (open, copy, execute)
By implementing this unified model, bkmr creates a consistent interface for managing disparate knowledge types:
- Bookmarks: Web resources with descriptive metadata
- Snippets: Reusable code patterns, potentially with templating
- Shell Commands: Executable actions stored with descriptive context
- Documentation: Longer-form knowledge with rich context
This unified approach allows to focus on what is needed rather than where it might be stored.
Recognizing synergy in combining bkmr
and rsnip
This insight is the motivation to not continue developing two tools:
bkmr for bookmark management and semantic search, and rsnip for snippet management.
- bkmr excels with advanced search functionalities, including AI-driven semantic and traditional full-text search, designed specifically for bookmarks.
- rsnip shines at managing reusable code snippets with dynamic templates, fuzzy search, and integration into a developer’s workflow.
Recognizing their complementary nature provides the reasoning for combining them.
Introducing the New bkmr: A Unified Approach
With the integration of the capabilities from both rsnip
and bkmr
, a more powerful and versatile knowledge management tool emerges.
The unified bkmr
provides developers with one coherent CLI-based system, housing various knowledge types — bookmarks, snippets, documentation, shell commands — in a single local database.
Seamless Workflow Integration
One of bkmr’s biggest advantages is workflow continuity. Adding knowledge — whether it’s a URL, code snippet, or shell command — is frictionless:
- Easily add bookmarks with automatic metadata extraction, enriching them with tags and detailed descriptions.
- Quickly store code snippets, embedding dynamic content through templating (e.g., inserting current dates, environment variables, or command outputs).
- Save and directly execute shell commands from within the tool.
Advanced Search Capabilities
bkmr significantly enhances search capabilities:
- Full-text and Tag Search: Traditional search mechanisms remain powerful, allowing developers precise retrieval based on specific keywords or classifications.
- Semantic Search: With integrated AI-based semantic search using OpenAI embeddings, developers discover contextually relevant results beyond traditional keyword-based approaches.
Actionable Knowledge
Beyond simple retrieval, bkmr ensures that each stored item becomes immediately actionable, minimizing the interruption to workflow:
- URLs launch directly into a browser from the command line.
- Snippets instantly copy to the clipboard, facilitating immediate use.
- Shell commands can be executed straight from the interface, dramatically reducing repetitive manual typing.
Unified and Performant
Built in Rust, bkmr leverages the language’s performance advantages to deliver speed. It maintains data privacy with a local-first approach, simply by not opting into using semantic search whith OpenAI. Moreover, consolidating bookmarks, snippets, and other resources into one local database reduces fragmentation and cognitive load, further streamlining the developer experience.
Advanced Search Capabilities
bkmr’s strength lies in its sophisticated retrieval mechanisms that align with how developers think about their knowledge needs.
Tag-Based Filtering with Prefix Support
The tag prefix system enables powerful, composable search patterns:
# Search for snippets related to authentication, excluding imported content
bkmr search --tags-prefix snippet --ntags auth --Ntags-prefix imported
This prefix system allows developers to:
- Create consistent search contexts (e.g., always excluding certain content types)
- Combine multiple tag filters to narrow results precisely
- Build specialized search functions for different domains
For example, a developer might create aliases for different work contexts:
# Project-specific knowledge
alias proj-api="bkmr search --tags-prefix project,api --fzf"
# Language-specific snippets
alias py-snippets="bkmr search --tags-prefix snippet,python --fzf"
Full-Text Search with Column Specificity
Beyond tags, bkmr implements powerful full-text search with column-specific queries. It builds upon sqlite’s mature FTS5 capabilities:
# Find bookmarks with "authentication" in the metadata column
bkmr search "metadata:authentication"
# Find shell commands related to Docker in the description
bkmr search "desc:docker tags:command"
This allows for precise targeting of search terms to relevant content areas.
Custom Search Functions
The tag prefix system enables sophisticated custom search functions:
# Find documentation with specific criteria
docs() {
bkmr search --fzf --tags-prefix documentation --ntags "$1" "$2"
}
# Example: docs aws "lambda functions"
These functions create domain-specific mini-applications built on bkmr’s core capabilities.
Semantic Search Integration
For cases where keyword matching falls short, bkmr offers semantic search capabilities powered by AI embeddings:
# Find content semantically related to "handling API rate limits"
bkmr semsearch "handling API rate limits"
This search mode understands conceptual relationships beyond exact text matching, helping developers find knowledge even when they don’t remember the exact terms used.
Streamlined Workflow Integration
bkmr excels at minimizing the friction between finding information and applying it.
Quick Addition
Adding new knowledge happens with minimal interruption:
# Add a bookmark with automatic metadata extraction
bkmr add https://useful-docs.com
# Add a code snippet with editor integration
bkmr add -t snippet -e
# Add a shell command for later reuse
bkmr add "docker run --rm -it -v $(pwd):/app node:16" -t command
These commands integrate smoothly into the development workflow, allowing developers to capture knowledge without significant context switching.
Actionable Results
More importantly, bkmr makes retrieved information immediately actionable:
- URLs open directly in the browser
- Snippets copy to clipboard or open in an editor
- Shell commands execute directly from the results
This action-oriented approach addresses the critical gap between finding and using information.
Interactive Interface
The fuzzy finder interface enables rapid narrowing of results:
# Search with interactive fuzzy finder
bkmr search --fzf "docker"
Within this interface, developers can:
- Preview full content before selection
- Use keyboard shortcuts for common actions (open, edit, delete)
- Filter results dynamically as they type
This interactive approach allows for exploration and refinement of searches without repeated command execution.
Advanced Configuration
bkmr’s flexibility extends through its robust configuration options.
Multiple Databases
Developers can maintain separate databases for different contexts:
# Personal knowledge base
alias bkmr-personal="BKMR_DB_URL=$HOME/.config/bkmr/personal.db bkmr"
# Work-specific database
alias bkmr-work="BKMR_DB_URL=$HOME/.config/bkmr/work.db bkmr"
This separation provides appropriate isolation while maintaining a consistent interface.
Integration with Other Tools
bkmr works seamlessly with other CLI tools:
# Process results with jq
bkmr search --json "api" | jq '.[] | .url'
# Combine with directory navigation
proj() {
cd ~/projects/$1 && bkmr search --tags "project-$1" --fzf
}
This interoperability extends bkmr’s capabilities through the broader ecosystem of developer tools.
Implementation Philosophy
bkmr’s design reflects several key principles:
- Speed: Built in Rust for minimal latency in search and retrieval
- CLI-Centric: Command-line interface integrates with developer workflows
- Extensible: Flexible configuration options support custom workflows
- Unified: Common interface across various knowledge types
These principles ensure that bkmr remains focused on its core purpose: minimizing the friction between knowledge retrieval and application.
Conclusion
The most valuable developer tools are those that fade into the background, removing obstacles rather than creating new ones.
bkmr achieves this by addressing a fundamental knowledge challenge: storing information, providing powerful retrieval mechanisms, and enabling immediate action. It provides developers with instant, precise recall of knowledge and reduces friction of context switching. Rather than managing multiple tools, developers gain a single source of truth — one comprehensive system designed specifically to focus on one thing.
In essence, bkmr
integrates seamless with a developer’s workflow, because it directly addresses a key pain point: minimizing disruption.