sysid blog

bkmr reborn

Streamlining Developer Productivity

Store it, find it, act on it.

Developers know the struggle: You’re deep into concentration when suddenly you need that specific command, website, or snippet you used weeks ago.

However, what should have been a quick retrieval turns into a disruptive search.

There are many tools, which individually address this issue. But rarely provide a holistic solution.

The Challenge

We face a common set of challenges when working with information:

  1. Fragmentation: Information scattered across bookmarks, notes, documentation, and code snippets
  2. Context Switching: Productivity loss from navigating between different tools and interfaces
  3. Retrieval Friction: Difficulty in quickly finding the right information at the moment of need

At its core, the problem isn’t 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.

Many tools today often focus narrowly, 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 action capabilities.

A unified model, many formats

One of bkmr’s biggest strengths is its ability to handle multiple content types in a context-aware way.

Under the hood, bkmr treats knowledge items consistently — content, metadata, classification, action — so you use one mental model for many formats: bookmarks, snippets, shell scripts, Markdown docs, plain text, env blocks, and file references.

That uniformity matters because each type comes with a sensible default action (open, copy, execute, render, print), closing the gap between “found it” and “use it” .

All these items are stored in bkmr’s local SQLite database with a unified tagging system and rich metadata. Because everything lives in one searchable place, bkmr effectively breaks down information silos and provides one consistent interface.

Powerful Search and Retrieval

At the heart of bkmr is a powerful search engine that ensures you can retrieve any saved item quickly. By default, bkmr supports both full-text search and advanced filtering by tags to narrow results. For example, you can tag items by technology or project (“python”, “security”, “projectX”) and then search within those tags for specific keywords. The search is designed to be fuzzy-friendly as well: you can perform quick fuzzy matches across all your content, and bkmr offers an interactive fzf selector so you can pick the desired result if multiple items match.

bkmr’s search capabilities are enhanced by optional semantic search integration. If enabled, bkmr can generate semantic embeddings (vector representations) of your content and use an OpenAI-powered API to find items by conceptual similarity.

Beyond just finding items, bkmr excels at letting you act on the results quickly. If your search yields exactly one result, bkmr will automatically perform that item’s default action for you. For instance, search for a unique bookmark and it will launch in your browser immediately, or search a unique shell snippet and it will drop you into the interactive execute mode straightaway.

Even when multiple results are found, the fzf-based picker shows a preview of each item’s content/metadata and hints about possible actions.

Moreover, bkmr can output results as JSON for piping to other tools, and since everything resides in a SQLite database, advanced users can run SQL queries or utilize the data programmatically. In essence, bkmr combines the speed of fuzzy finders with the precision of database queries.

Tag-Based Filtering with Prefix Support

The tag prefix system enables powerful, composble 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:

  1. Create consistent search contexts (e.g., always excluding certain content types)
  2. Combine multiple tag filters to narrow results precisely
  3. 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"

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 to find knowledge even when the exact terms are not remembered.

Seamless Editor Integration via LSP and Plugins

A standout feature of bkmr is how it brings your curated knowledge into your editor/IDE. This is achieved through the bkmr Language Server (bkmr lsp) and dedicated editor plugins that leverage it. The bkmr LSP implements the Language Server Protocol for snippet completions, allowing any LSP-compatible editor (VS Code, Neovim, Emacs, etc.) to access bkmr’s snippet library in real time (Built-in LSP server).

Crucially, bkmr lsp delivers processed snippet content, not just static text. This means if your snippet contained a template (say, a placeholder for the current date or output of a command), the LSP will interpolate or execute it and insert the final result directly into your code. Such dynamic snippet expansion goes beyond typical IDE “live templates,” effectively giving you context-aware code generation on the fly (server-side interpolation).

Special IDE support

Seamless Workflow Integration

Adding data

# Add a bookmark with automatic metadata extraction
bkmr add https://useful-docs.com

# Add a code snippet interactively
bkmr add -t snippet -e

# Add a shell command for execution
bkmr add "docker run --rm -it -v $(pwd):/app node:16" -t command

Actionable Knowledge

Beyond retrieval, bkmr ensures that each item becomes immediately actionable:

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:

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 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() {
    pushd ~/projects/$1 && bkmr search --tags "project-$1" --fzf
}

Replacements

Here are examples of what bkmr could replace in a developer’s toolkit:

bkmr reduces the mental overhead of remembering where things are saved and which tool to use.

Conclusion

The most valuable developer tools are those that fade into the background, removing obstacles rather than creating new ones.

bkmr tries to achieve this by addressing a fundamental challenge: storing information, finding it and enabling immediate action.

Minimize Disruption!

#rust #work #development #knowledge_management