Skip to content

Quick Start

sysid edited this page Oct 12, 2025 · 2 revisions

Quick Start Guide

Get productive with bkmr in 5 minutes.

Installation

Choose your preferred method:

# Via Cargo (Rust)
cargo install bkmr

# Via pip/pipx
pip install bkmr

# Via Homebrew
brew install bkmr

For detailed installation instructions, see Installation.

Initial Setup

# 1. Generate configuration
bkmr --generate-config > ~/.config/bkmr/config.toml

# 2. Create database
bkmr create-db ~/.config/bkmr/bkmr.db

# 3. Optional: Set environment variable
export BKMR_DB_URL=~/.config/bkmr/bkmr.db

Your First Bookmark

# Add a web URL (metadata is fetched automatically)
bkmr add https://github.com/sysid/bkmr rust,cli

# Search for it
bkmr search rust

# Open it in your browser
bkmr open <id>

Essential Workflows

1. Store a Code Snippet

# Add a snippet (will be copied to clipboard when accessed)
bkmr add "SELECT * FROM users WHERE active = true" sql,_snip_ --title "Active Users Query"

# Find and copy it
bkmr search --fzf -t _snip_
# Press Enter to copy to clipboard

2. Create a Shell Script Bookmark

# Add a shell script (interactive editor will open)
bkmr add "" ops,_shell_ --title "Deploy to Staging"

# In the editor, add:
#!/bin/bash
echo "Deploying to staging..."
ssh staging "cd /app && git pull && systemctl restart app"

# Execute it later
bkmr search --fzf -t _shell_
# Press Enter, edit if needed, then execute

3. Save Markdown Documentation

# Add markdown that renders in browser with TOC
bkmr add "# Project Setup\n\n## Prerequisites\n- Node.js 18+\n- PostgreSQL" docs,_md_ --title "Setup Guide"

# Render it
bkmr open <id>

4. Use Interactive Fuzzy Search

# Fuzzy finder with all features
bkmr search --fzf

# Keyboard shortcuts in fzf:
# - Enter: Open/execute bookmark
# - Ctrl-O: Copy URL to clipboard
# - Ctrl-E: Edit bookmark
# - Ctrl-D: Delete bookmark

Next Steps

Now that you've got the basics, explore:

Common Commands

# Search with tag filtering
bkmr search -t python,security "authentication"

# Add bookmark from stdin
echo "some content" | bkmr add --stdin quicknote --title "Quick Note"

# Edit bookmarks with smart detection
bkmr edit <id>  # Opens source file for file-imported bookmarks

# List all tags
bkmr tags

# View specific bookmark
bkmr show <id>

For complete command reference, see Basic Usage.

Clone this wiki locally