Decant turns the Claude Code and Codex session logs on your machine into tangible insights. See where tokens, cost, and agent time go, inspect context usage, find the files and tools agents touch, and search complete transcripts from a CLI or local web UI.
Decant is local-first. It makes no outbound network calls at runtime, and your transcripts never leave your machine.
Built by Dosu, Knowledge Infrastructure for Agents. Dosu helps make agents faster, cheaper, and more effective.
Run Decant with npx
with no Bun install or global package required.
npx @dosu/decant@latest
This starts the local UI at http://127.0.0.1:3000, indexes the Claude Code and Codex logs on your machine, and watches for changes.
- One SQLite archive for Claude Code and Codex sessions.
- Full-text search across messages, tool calls, and transcripts.
- Token, estimated cost, context, activity, tool, MCP, and file analytics. - Browsable sessions, projects, files, and ingest diagnostics.
- Markdown, JSON, report, and trajectory exports.
- Deterministic scripts, replays, and agent instructions distilled from command history.
Published binaries support macOS and Linux on x64 and arm64. Native Windows binaries are not currently available.
Install a persistent command with npm:
npm install --global @dosu/decant@latest
decant
Or use Homebrew:
brew install dosu-ai/dosu/decant
decant
Or install the latest release without Node.js or Bun:
curl -fsSL https://raw.githubusercontent.com/dosu-ai/decant/main/install.sh | sh
decant
See Distribution for installer options, Docker, source builds, and release verification.
docker run --rm \
-p 127.0.0.1:3000:3000 \
-v decant-data:/var/lib/decant \
-v "$HOME/.claude/projects:/sources/claude:ro" \
-v "$HOME/.codex:/sources/codex:ro" \
ghcr.io/dosu-ai/decant:latest
Keep the 127.0.0.1:
prefix. Publishing -p 3000:3000
exposes the unauthenticated archive API on every host interface. Custom container networks may need the trusted-peer setting documented under Docker distribution.
decant # start the local web UI
decant sync # index new and changed sessions
decant ls # list sessions
decant show 1 # render a transcript
decant search "auth bug" # full-text search
decant stats --by model # usage and cost rollups
decant economics # token, cost, and time breakdowns
decant files --group ext # file hotspots
decant tool stats # tool usage
decant mcp stats # MCP server usage
decant export 1 > session.md # export a session
Run decant --help
or decant <command> --help
for all commands and flags.
Read commands support --json
; global flags include --db
, --format
,
--quiet
, --no-color
, and --no-sync
.
To index selected files or a temporary source tree:
decant --db /tmp/decant.db sync --path ./session.jsonl --path ./sessions
The OpenAPI 3.1 contract is docs/api/openapi.yaml, and a running server exposes it at http://127.0.0.1:3000/api/openapi.json. See API recipes for examples.
Analytics methodologyPricing estimatesArchive and data lifecycleLocal Serve APIDistribution and release verificationArchitecture
Contributions are welcome. Read CONTRIBUTING.md for setup, tests, and privacy requirements. Coding agents should also read AGENTS.md.
Use synthetic session data in issues and tests. Real transcripts can contain source code, prompts, credentials, and local paths.
Report vulnerabilities privately as described in SECURITY.md.
Decant is built and maintained by Dosu, Knowledge Infrastructure for Agents. Dosu helps make agents faster, cheaper, and more effective. Decant shows what your agents spent, read, and touched via your agent logs.
Decant was inspired in part by Letta's Trajectory, which normalizes agent transcripts across runtimes into a shared record format.
Decant is licensed under the Apache License 2.0.