Docs / Configuration

Files and paths

Updated

TL;DR — Tokenade's state lives in ~/.tokenade/ (%USERPROFILE%\.tokenade on Windows); stashed outputs and the embedding model live in ~/.cache/tokenade/ (%LOCALAPPDATA%\tokenade on Windows). A project can hold .tokenade/filters/. `tokenade uninstall` removes both trees.

Tokenade keeps everything it owns in two directories in your home: a state directory, ~/.tokenade/, and a cache directory, ~/.cache/tokenade/. Besides those, it writes its hooks and rules into your agents' own config files. Nothing is stored anywhere else unless you point it there with an environment variable.

The two trees, per OS

LinuxmacOSWindows
State~/.tokenade/~/.tokenade/%USERPROFILE%\.tokenade\
Cache~/.cache/tokenade/~/.cache/tokenade/%LOCALAPPDATA%\tokenade\

How they are resolved:

  • Home: $HOME on Linux and macOS. On Windows, %USERPROFILE% comes first, because HOME is usually unset there (only Git Bash and MSYS2 set it).
  • Cache: $XDG_CACHE_HOME if set, else %LOCALAPPDATA%, else $HOME/.cache, else %USERPROFILE%\AppData\Local. An empty variable counts as unset. macOS uses ~/.cache, not ~/Library/Caches.

On Linux and macOS, Tokenade tightens these directories to owner-only permissions (0700 for directories, 0600 for sensitive files), because caches can hold command lines captured before redaction.

Inside ~/.tokenade/

Account and license (moved together by TOKENADE_CONFIG_DIR):

FileWhat it is
license.keySigned license for this machine, written by tokenade login.
machine-idStable identifier of this machine.
quota.jsonLast plan and quota status received from tokenade.net.
reporter-offset, reporter-offset-estimated, report-health.jsonHow far the usage ledgers have been reported, and when tokenade.net was last reached.
update-check.json, auto-update-offLast update check; the marker written by tokenade upgrade --off.

Savings and memory:

FileWhat it is
gain.jsonlMeasured savings ledger, one row per compaction. Rotates at 10 MiB.
gain_estimated.jsonlEstimated savings (brevity, batching), kept apart from measured ones.
mistakes.jsonlDead-end memory. See Dead-end memory.
redact.jsonlCounts of which redaction rule fired and when.

Indexes and caches (SQLite):

FileWhat it is
index.dbSymbol index for map, query, impact, keyed by project path.
semantic.dbEmbeddings for semantic and --prompt.
dedup.dbRecently seen outputs, used to avoid sending the same bytes twice.
fold_store.db, file_search.dbFolded-output store and file-search cache.

Each of these five can be redirected with TOKENADE_DEDUP_DB, TOKENADE_INDEX_DB, TOKENADE_SEMANTIC_DB, TOKENADE_FOLD_STORE_DB and TOKENADE_FILE_SEARCH_DB.

Configuration and logs:

FileWhat it is
filters/Your own compactors, installed by tokenade add-compactor. See Custom compactors.
trusted-filters.jsonContent hashes of project filters you approved.
install-options.jsonThe flags you passed to tokenade install, reused by later installs, upgrades and self-repair. tokenade install --defaults forgets them.
statusline-off, statusline-promos-offMarkers written by tokenade statusline off and tokenade statusline promos off.
shellproxy.sh, .csh, .nu, .cmdShell-proxy fragments sourced from your shell rc files.
debug.log, debug.log.1Debug log, rotated at 16 MiB. Read it with tokenade hooks tail.
dashboard.htmlThe local dashboard page written by tokenade dashboard.
last-report.zipThe archive built by tokenade report (also by --dry-run).
sessions/Small per-session state files, swept automatically.

You will also see lock files, timestamps and one-shot markers. They are internal and safe to ignore.

Inside ~/.cache/tokenade/

PathWhat it is
stash/Full outputs replaced by a summary, recoverable with tokenade expand-ref <hash>. Entries expire after 7 days; the directory is capped at 2 GiB (TOKENADE_STASH_MAX_DIR_BYTES). Move it with TOKENADE_STASH_DIR.
stash-keep/Markers for stash entries that are the only copy of something.
model/The local search model, about 132 MB, downloaded once on first semantic or --prompt use. Pre-seed it elsewhere with TOKENADE_MODEL_DIR.

To see how much space all of this takes, run tokenade healthcheck: the disk-footprint row lists the biggest items.

Inside a project

A project directory can contain a .tokenade/ folder:

  • .tokenade/filters/*.toml: compactors shipped with the repository. They run only after tokenade trust-filters.
  • .tokenade/reads/: PNG copies of images your agent cannot display (.tiff, .bmp, .ico…), converted so it can read them.

Tokenade adds .tokenade/ to your global git ignore file, ~/.config/git/ignore, so this folder is never committed by accident.

Agent config files Tokenade writes

tokenade install only edits what each detected agent needs. The main files:

AgentFiles
Claude Code~/.claude/settings.json (hooks tagged tokenade, statusLine, env), ~/.claude/CLAUDE.md (a fenced <!-- tokenade:start --> block)
Codex~/.codex/hooks.json, hook trust entries in ~/.codex/config.toml, ~/.codex/AGENTS.md
Cursor~/.cursor/hooks.json, ~/.cursor/rules/tokenade.mdc
Antigravity~/.gemini/GEMINI.md
GitHub Copilot CLI~/.copilot/hooks/tokenade.json, ~/.copilot/copilot-instructions.md
OpenCode / Kilo Code~/.config/opencode/plugin/tokenade.ts, ~/.config/kilo/plugins/tokenade.ts

If you moved Claude Code's config with CLAUDE_CONFIG_DIR, Tokenade follows it. With tokenade install --per-project, the agent files go into ./.<agent>/ in the current project instead of your home. The per-agent pages list every file; tokenade uninstall --dry-run prints the exact list on your machine.