sysid blog

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:

  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
  4. 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:

By implementing this unified model, bkmr creates a consistent interface for managing disparate knowledge types:

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.

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:

Advanced Search Capabilities

bkmr significantly enhances search capabilities:

Actionable Knowledge

Beyond simple retrieval, bkmr ensures that each stored item becomes immediately actionable, minimizing the interruption to workflow:

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:

  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"

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:

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:

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:

  1. Speed: Built in Rust for minimal latency in search and retrieval
  2. CLI-Centric: Command-line interface integrates with developer workflows
  3. Extensible: Flexible configuration options support custom workflows
  4. 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.

#rust #work #development #knowledge_management