Codemark bookmarks code by structure, not by line number. A file:line
reference breaks the moment you add a newline above it; Codemark uses
tree-sitter to remember what you
marked β a function, a block, a type β so the bookmark still points at the right
place after you rename, refactor, or reformat around it.
That durability is what makes it useful for long agent sessions, code audits, and keeping track of things you want to find again.
- Use It With Your Agent
- Native Dashboard (TUI)
- Features
- Installation
- Quick Start
- Supported Languages
- Customizing Markdown Output
- Documentation
- Built With
- License
Codemark ships with a skill you can install into your coding agent. Once it's in, the agent knows how to create and recall structural bookmarks on its own β so the context it built up in one session is still there in the next, instead of being rebuilt from scratch every time.
codemark install-skill --agent claude --scope userThen just ask, in any session:
"Trace how a request flows from the HTTP router to the database. Create a collection called
request-lifecycleand bookmark each key hop β the route handler, the auth middleware, the service layer, and the query builder. Add a short note to each explaining its role."
Later, in a fresh session and even after the code has moved around, you or another agent can pick the context back up:
"Load the
request-lifecyclecollection and walk me through it."
The bookmarks are structural, so they still resolve once the underlying code has
changed. Works with Claude Code, GitHub Copilot, Gemini CLI, and any
agent that loads .agents/skills.
Once a flow lives in a collection, anyone can reuse it β you, a teammate, or the next agent session:
- π§ Onboard a new engineer
"Load the
request-lifecyclecollection and give me a guided tour of how this service handles a request, in the order the code runs." - π Explain a code flow
"Bookmark the steps of the checkout flow into a
checkoutcollection, then summarize what each step is responsible for." - π Hunt a bug in a known flow
"There's a bug where expired tokens are still accepted. Read the
auth-flowcollection and tell me which hop is most likely responsible." - π Relate two flows
"Compare the
request-lifecycleandbackground-jobscollections β where do they share code or state, and where could they conflict?"
π Walkthrough: Agent Workflow Guide Β· Agent Skill source
Codemark comes with a keyboard-driven dashboard in the style of lazygit. It's
the main way to browse and manage bookmarks, collections, and tours by hand.
codemark tuiRequires a Nerd Font. The dashboard uses glyph icons throughout β set your terminal to a Nerd Font (e.g.
JetBrainsMono Nerd Font) so they render correctly instead of showing asβ‘placeholders.
|
Settings overlay |
FTS & semantic search |
Filter pane contents |
Resize & cycle layouts |
See the Demo Gallery for the full-size animated walkthroughs.
The TUI ships with built-in color schemes that re-theme the whole interface. Set
one in your config (tui.theme) or via the CODEMARK_TUI_THEME environment
variable; run codemark-tui --list-schemes to see what's available.
| Catppuccin Mocha | Everforest Dark |
|---|---|
![]() |
![]() |
- β¨οΈ Keyboard-driven, vim-style navigation A
lazygit-like, fully keyboard-first interface. Move withj/k(or arrows), cycle panes withTab, switch tabs with[/], and resize panes with+/-. Press?at any time for a context-aware help overlay. - π Push / pull syncing Publish collections and tours to a remote
codetours server with
P(push), and pull shared tours back down withp. Share curated walkthroughs across a team. - π Semantic & full-text search Press
/to search, then toggle between FTS (SQLite full-text) and Semantic (local vector embeddings) modes. FTS finds exact terms; Semantic finds bookmarks by meaning β no API key required. - π Customizable markdown previews The details and collection-overview
panes render through Handlebars templates. Drop your
own
details_panel.mdorcodemark_collection_overview.mdinto the config directory to reshape what's shown. - π¨ Colorschemes & themes Set
[tui].themein your config. Bundled options includeOneHalfDark(default),Dracula,Nord,gruvbox-dark,Solarized,Catppuccin Mocha, and more. Base16/base24 schemes theme both the code preview and the surrounding UI chrome; drop your own.tmThemeor base16.yamlfiles into thethemes/config subdirectory to add custom ones. See Configuration. - βοΈ Open in any editor Press
oon a bookmark to jump straight to the code in your configured editor (terminal or GUI). Configure perβfile-extension commands via the[open]config section β see Configuration.
- π§ Smart Resolution: Bookmarks survive renames and structural changes via tiered matching (Exact β Relaxed β Hash Fallback).
- π₯οΈ Interactive Dashboard: Lazygit-style TUI for efficient, keyboard-first interaction.
- π Rich Metadata: Captures AST structure, git context, content hashes, and append-only notes/tags.
- π Semantic Search: Find code by intent (e.g., "where is authentication handled?") with local embeddings β no API key.
- ποΈ Collections: Group bookmarks into logical sets for specific tasks.
- π¦ Git Integrated: Track bookmarks across commits and branches.
- π§© Agent Skills: An installable skill that teaches AI coding agents to bookmark for you β works with Claude Code, GitHub Copilot, Gemini CLI, and any agent that loads
.agents/skills.
Prebuilt binaries are published for macOS (Apple Silicon & Intel), Linux (x86_64, glibc), and Windows (x86_64). Choose whichever method you prefer.
brew install DanielCardonaRojas/codemark/codemarkcurl --proto '=https' --tlsv1.2 -LsSf https://github.com/DanielCardonaRojas/codemark/releases/latest/download/codemark-cli-installer.sh | shpowershell -ExecutionPolicy Bypass -c "irm https://github.com/DanielCardonaRojas/codemark/releases/latest/download/codemark-cli-installer.ps1 | iex"mise use -g github:DanielCardonaRojas/codemarkcargo install --git https://github.com/DanielCardonaRojas/codemark codemark-cliRequires Rust 1.85+ (edition 2024). SQLite is bundled.
The script, PowerShell, and
misemethods install prebuilt binaries from the GitHub releases. You can also download a platform archive there directly.
codemark tui opens the interactive dashboard, a separate companion binary. Homebrew installs it automatically alongside the CLI. The other prebuilt methods (script, PowerShell, mise) install the codemark CLI only; add the dashboard with:
cargo install --git https://github.com/DanielCardonaRojas/codemark codemark-tuiRepo-aware by default. Codemark automatically detects the current Git repository (walking up from your working directory) and stores bookmarks alongside it β no setup required. You can also operate on a repo from any path by referencing it by identity with
--repo <owner/name>, or point at a specific database with--db <path>/ theCODEMARK_DBenv var.
Prefer to drive it yourself instead of through an agent? The CLI is all you need.
codemark add --file src/auth.rs --range 42-67 --tag auth --note "token validation entrypoint"codemark list # see everything you've marked
codemark resolve <id> # re-locate a single bookmark
codemark search "auth" # full-text + semantic searchcodemark tuiSee the Full Command Reference for every subcommand and flag β including collections, tours, snippet matching, and multi-repo queries.
Codemark speaks AST for:
- π¦ Rust
- π Swift
- π· TypeScript / TSX
- π Python
- πΉ Go
- β Java
- π― Dart
- β― C#
Codemark formats command output and TUI previews with Handlebars templates. Override the default for codemark show (and the TUI panes) by dropping your own template in the config directory:
mkdir -p ~/.config/codemark/templates
cp ./templates/codemark_show.md ~/.config/codemark/templates/
$EDITOR ~/.config/codemark/templates/codemark_show.mdFor the full template specification β every available variable, loops, conditionals, helpers, and the default templates β see the Templates reference.
- Full Command Reference β Detailed flag and subcommand guide.
- Configuration β Editor setup, themes, global/local config, and semantic search.
- Templates β Customize markdown output and TUI previews.
- Agent Workflow Guide β End-to-end walkthrough of using Codemark with an AI agent.
- Agent Skill β The skill installed by
codemark install-skill(Claude Code, Copilot, Gemini, and more).
Codemark is a local-first Rust workspace β no cloud service, account, or API key is required for any core feature.
| Layer | Technology |
|---|---|
| Language | Rust (workspace: codemark-core, codemark-cli, codemark-tui, codetours-server) |
| Structural parsing | tree-sitter |
| Storage | SQLite via rusqlite (bundled), with sqlite-vec for vector search and FTS5 for full-text search |
| Embeddings | Local models run on candle β semantic search with no API key |
| TUI | ratatui + crossterm, with syntect syntax highlighting |
| Templating | Handlebars |
| Sync server | axum + tokio, JWT auth (the codetours server) |
| Git integration | git2 (libgit2) |
Released under the MIT License.


