Codemark turns the critical parts of your codebase into a searchable, shareable map of structural bookmarks that survive refactors, so you (and your agents) always know where the important code lives.
brew install DanielCardonaRojas/codemark/codemark
macOS & Linux. Installs the CLI and the codemark tui dashboard.
Prebuilt binaries for macOS, Linux & Windows. SQLite bundled.
# Bookmark a function: captures its AST, not a line number
$ codemark add --file src/auth.rs --range 42 --tag auth --note "Token validation"
✔ Added bookmark 'a1b2c3d' for validate_token in src/auth.rs
# Refactor happens... lines shift... the function is renamed...
# Resolve: finds where the code lives *now*
$ codemark show a1b2 --location
src/auth.rs:89:15 (Match: Relaxed)
# Search by meaning, with local embeddings. No API key
$ codemark search --semantic "database connection initialization"
b8x9z2 | src/db.rs:12 | init_pool | score: 0.89
Native Dashboard
Codemark ships with a built-in, keyboard-driven TUI inspired by lazygit.
Browse bookmarks, preview resolved code, run queries, and switch collections, all without leaving the terminal.
tui.theme in your config or via CODEMARK_TUI_THEME to switch.
Why Codemark
Traditional bookmarks point at a coordinate. Codemark understands your code the way a compiler does, so a reference knows what it points to, not just where.
Bookmarks identify code structurally. A renamed function is still found, even if it moved across the file.
Tiered resolution (exact match, then relaxed query, then content-hash fallback) degrades gracefully instead of breaking silently.
Ask "where's the auth logic?" using local vector embeddings (sqlite-vec). No external API calls, no keys.
Line-oriented, pipe-friendly JSON output that composes naturally with fzf, bat, jq, and shell scripts.
Attach notes, tags, authors, and git context to any bookmark. Group them into collections you can reload across sessions.
Auto-detects and parses Rust, Swift, TypeScript/TSX, Python, Go, Java, C#, and Dart.
| Capability | Standard IDE bookmarks | Codemark |
|---|---|---|
| Refactor resilience | Breaks on line shifts | Survives renames & moves |
| Search | Literal text only | Local vector embeddings |
| Metadata | Minimal | Notes, tags & authors |
| Agent integration | UI-only | LLM-native skills |
| Sharing | Local & private | Publish & pull via Codetours |
Contextual Memory
A bookmark is a container for knowledge. Attach rich metadata to any piece of code and build a searchable map of your project's architecture.
#auth, #vulnerability, or #entrypoint.{
"id": "a1b2c3d",
"data": {
"file_path": "src/auth.rs",
"line_range": "42:67",
"note": "Critical JWT validation. Contact security before modifying.",
"tags": ["auth", "security", "entrypoint"],
"created_by": "daniel",
"collection": "security-audit-2026"
}
}
Fits your setup
Codemark is built for real-world git workflows across worktrees, forges, and accounts.
Worktrees share one .git directory, and Codemark knows it. Bookmarks resolve correctly whichever worktree you're in.
GitHub, GitLab, Bitbucket, or a generic host: authenticate against whichever forge each repository lives on.
Keep your work and personal identities side by side. Log in per account and switch without re-authenticating.
# Authenticate a second account on a different forge
$ codemark auth login --forge gitlab --username work
# Query bookmarks across repositories by identity
$ codemark list --repo acme/api --repo personal/sketch --tag entrypoint
Agent-ready
Codemark isn't only for humans. Install the skill and agents like Claude Code can bookmark critical discoveries as they explore, keeping context alive across long-running sessions.
Instead of re-deriving the same map every session, your agent records what it learned and reloads it next time.
# Teach your agent how to use Codemark
$ codemark install-skill --agent claude --scope user
✔ Installed Codemark skill for claude
# The agent discovers and records auth logic on its own
$ codemark add --file src/auth.rs --range 42 --created-by agent --note "Observed entrypoint"
✔ Bookmarked 'a1b2' for later reference
Quick Start
Teach your AI agent how to use Codemark.
codemark install-skill --agent claude --scope user
Ask it to capture the structure of your codebase as it explores.
"Create a collection called auth-audit and bookmark the key functions involved in authentication."
Launch the keyboard-driven TUI to review what's been captured.
codemark tui