.v1.json` (in the repo, [`schemas/cal/`](schemas/cal/)), generated from the Rust types: a test fails when the two drift. A new field can appear within a version, so ignore fields you don't know; removing or renaming one, or changing its type, bumps the version, and a reader should refuse a version newer than it was written for. Plain `--json` still prints the bare arrays and objects it always has, so existing scripts keep working, but that shape is unversioned and may change in a future major release.
**Without the app** (a server, a CI box, with the standalone `cal` above): `cal` runs the app's background jobs itself, against the same index and with the same rules.
```bash
cal index # one pass over every agent's history (creates the index; exit 1 on errors)
cal index --if-stale # that pass in the background, only when no full pass finished in the last hour (a hook)
cal watch # keep it fresh as agents write: the app's watcher, one line per batch
cal embed # build the semantic index (downloads the ~128 MB model once)
cal embed --no-download # the same, only with a model already on this machine
cal distill --auto # one drain of the auto-distill worklist under the daily cap
cal backup # a copy of the index in its snapshots folder (free on APFS, else a full copy)
cal backup --to ~/Backups # the same, into a folder you choose
```
`cal index` and `cal watch` build and refresh the index with no app at all. `cal distill --auto` (and the drain `cal watch` runs when auto-distill is on) needs memory turned on with an engine, which only the app's **Settings → AI engine** does today. Once that is done it drains with the app closed: a logged-in `claude` or `codex` CLI and local Ollama need nothing more, and an API key is read from the OS keychain where the app saved it. On a machine that never ran the app, `cal distill --auto` says memory is off.
Only one process watches an index at a time: the app holds `index.db.gui.lock` next to the index while it runs and `cal watch` holds `index.db.watch.lock`. `cal watch` refuses to start while the app runs, and the app keeps its own watcher off while `cal watch` runs (Settings → Index says so) and takes over within a minute after it stops (a second app open on the same index waits for the first the same way). `cal distill --auto` refuses while either runs, since both distill on their own, and the app starts no auto-distill round while `cal watch` or `cal distill --auto` runs. `cal index` and `cal embed` are safe alongside either; `cal index` holds `index.db.index.lock`, so two passes never overlap, and a semantic build holds `index.db.embed.lock`, so two never embed the same backlog: `cal embed` refuses while the app or `cal watch` is building (try again when it finishes), and their builds skip while it runs. Shrink index and Reclaim space in the app hold `index.db.rewrite.lock` for the whole rewrite: `cal index`, `cal watch`, `cal embed` and `cal distill --auto` refuse to start until it is done, and the app refuses to start one while any of them is writing. `cal index --if-stale`, the Claude Code plugin's SessionStart hook, starts a pass only when no app, `cal watch` or other pass runs, the index exists, is not empty and needs no upgrade, and no full pass finished in the last hour; it appends the pass's output to `index.db.index.log` and, like every hook, prints nothing and never creates the index and upgrades it only with the launcher's `cal` while no app runs the index. These four may create and upgrade the index; `cal embed` without `--no-download` is the only `cal` command that downloads the model, and hooks and the MCP server still never do. `cal distill --auto` holds `index.db.distill.lock` and needs auto-distill on in Settings → AI engine. `cal index` and `cal embed` do not yield to the app's Shrink index or Reclaim space, and the app refuses those two while `cal watch`, `cal distill --auto` or a background `cal index` runs; rerun the command afterwards if one interrupted it.
**VS Code / Cursor**: the extension adds a "Callimachus History" sidebar, a status-bar search button, commands to search / insert / copy threads, and **Why This Line** (editor context menu) for the sessions behind the line under the cursor (it shells out to `cal`). Install from the **[VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=BetaBotsLLC.callimachus-vscode)** or **[Open VSX](https://open-vsx.org/extension/BetaBotsLLC/callimachus-vscode)** (the registry **Cursor** and VSCodium use), or grab the `.vsix` from [Releases](../../releases). See [apps/vscode/README.md](apps/vscode/README.md).
## Notes / limitations
- Cross-platform (macOS / Windows / Linux), including the "Open in CLI" / "Resume" launchers. They open Terminal on macOS, a new console window on Windows, and on Linux the first terminal they find (`$TERMINAL`, then `x-terminal-emulator`, GNOME Terminal, Konsole, xfce4-terminal, kitty, Alacritty, WezTerm, xterm). On a Linux machine with none of these, the buttons are hidden.
- Cline / Roo Code / Kilo Code are editor extensions with no CLI, so they are index-only (searchable, but not relaunchable via "Resume").
- Claude Code subagent transcripts are indexed but hidden behind a "subagents" toggle by default.
- Moved your Claude Code, Codex or Copilot CLI data (`CLAUDE_CONFIG_DIR` / `CODEX_HOME` / `COPILOT_HOME`)? An app opened from the Dock, Finder or Start menu doesn't see shell variables, so set those folders under **Settings → Sources** (changing one reindexes that source).
- Large first index is a one-time cost (the Claude corpus here was ~90k messages in ~25s); subsequent passes skip unchanged files.
- The index (`index.db`), the embedding model (`models/`) and the app's diagnostics log (`callimachus.log`) live together in the per-user app data folder `dev.shaller.callimachus` (`~/Library/Application Support` on macOS, `%LOCALAPPDATA%` on Windows, `~/.local/share` on Linux). For a bug report, paste the output of `cal doctor` (or the app's Settings → General → **Copy diagnostics**) and attach `callimachus.log`. On macOS and Linux the folder and the index files are readable only by you.
- The index is often the only copy of your history: Claude Code deletes its own transcripts after 30 days by default. On macOS the app keeps snapshots of it in `snapshots/` next to it: one before each schema upgrade (kept 7 days) and one a week, taken only after `PRAGMA quick_check` passed. They are APFS clones, free when taken and growing as the index changes; Settings → Index & storage and `cal doctor` show what they cost. Nothing is deleted to make room: while the disk has less free space than the index's own size no snapshot is taken, except a weekly one that replaces the last weekly one. Shrink index / Reclaim space remove the automatic ones (the rewrite would make each a full copy; the weekly one stays while the last integrity check had failed). Each index has its own identity, so a new index built after a damaged one was moved away never removes the old one's snapshots: they stay, holding the old history, until you delete them. If the index is ever damaged, the app's startup screen offers to restore the newest one (checked first; an older one is used when it fails the check), keeping the damaged files beside it. On a disk that cannot clone (exFAT, HFS+) Settings and `cal doctor` say snapshots are not automatic. Linux and Windows get no automatic snapshots yet; `cal backup` (or `cal backup --to DIR`) makes a full copy there, refused when the disk has less free space than the index plus 10%.
- More sources (Charm Crush, Factory Droid) are scoped but not yet integrated. See [the indexer guide](apps/desktop/src-tauri/core/src/indexer/README.md).
## Contributing
Issues and PRs welcome. [CONTRIBUTING.md](CONTRIBUTING.md) covers local setup, conventions, and the release flow. Adding support for another agent is a [small, documented contract](apps/desktop/src-tauri/core/src/indexer/README.md), usually one indexer module + a migration + a few wiring points.
## Security & privacy
Callimachus is local-first. Your index, transcripts and memory never leave your machine, except conversation content you explicitly send to an LLM provider you choose (the in-app chat, Knowledge distillation, Ask your history, project briefs and conflict review, and AI-summarized Obsidian exports; local Ollama keeps even that on-device) and the excerpts that agents you connect over MCP or hooks pull into their own sessions. API keys live in the OS keychain, never on disk.
The desktop app can send anonymous, **opt-in** usage analytics to PostHog (US): event names, app version, OS, CPU architecture and language, and a few properties picked from fixed lists (such as which agent source, AI provider or setting an event concerns, an error category, or a count rounded into a range), tied to a random install ID. It never sends file paths, thread titles, prompts, transcripts, project names or API keys. It is off until you choose **Allow**, and you can turn it off any time in **Settings → General** or with `CALLIMACHUS_TELEMETRY=0` / `DO_NOT_TRACK=1`. The CLI and MCP server never send analytics. The only other network traffic is the update check against GitHub Releases and the embedding-model download from Hugging Face (desktop app only, the first time you build the semantic index). The website uses PostHog in cookieless mode (no cookies, no cross-site tracking).
The full breakdown is in [SECURITY.md](SECURITY.md) and the [privacy policy](https://callimachus.app/privacy). To report a vulnerability, see [SECURITY.md](SECURITY.md).
## License
**Dual-licensed.** Free and open source under **[AGPL-3.0-or-later](LICENSE)**: use,
modify, and share it; if you distribute it or run a modified version as a network
service, you must release your source under the AGPL.
For **closed-source, proprietary, or for-profit/SaaS use** that the AGPL doesn't
permit, a **commercial license** is required. See **[COMMERCIAL.md](COMMERCIAL.md)**
(contact ari@shaller.dev).
© 2026 Ari Shaller. See [NOTICE](NOTICE) for attributions. Contributions are accepted
under the terms in [CONTRIBUTING.md](CONTRIBUTING.md).
## Acknowledgements
Built on [Tauri](https://tauri.app), [fastembed-rs](https://github.com/Anush008/fastembed-rs), [sqlite-vec](https://github.com/asg017/sqlite-vec), and [genai](https://github.com/jeremychone/rust-genai). Named for [Callimachus of Cyrene](https://en.wikipedia.org/wiki/Callimachus), who catalogued the Library of Alexandria.
Social preview: assets/og.png · brand sources in assets/brand/