# Claude Code CLI × Tokenade

> Tokenade covers all of Claude Code CLI: every layer applies, and you change nothing about how you work.

## What `tokenade install` does

- Hooks in `~/.claude/settings.json`: PreToolUse, PostToolUse, SessionStart, UserPromptSubmit, PreCompact, SubagentStop.
- Bash and Read go through `hookwrap`: command output is compacted before you see it, decisive lines kept.
- WebFetch: the PreToolUse hook fetches and folds the page itself. WebSearch results are replaced in place on Claude Code ≥ 2.1.121.
- Read/Grep/Glob: repeated reads of an unchanged file are deduplicated; DOCX and other documents are converted to text (PDFs stay native — you read them already).
- Context: PreCompact/SessionStart/SubagentStop hooks plus an auto-compact window keep your history lean between turns.
- Rules: a short note in `~/.claude/CLAUDE.md` lists the `tokenade` commands (map, skeleton, query, search, read, web).
- MCP: every third-party server in `.mcp.json` and `~/.claude.json` is wrapped as `tokenade mcp-proxy -- <original command>` (original kept, undone by `tokenade uninstall`), so its results reach you folded.
- Secrets in tool output are redacted before they reach the model.

## Coverage

- ✓ Command compaction — Supported
- ✓ Web search — Supported
- ✓ MCP optimization — Supported
- ✓ Code search — Supported
- ✓ Lean output — Supported
- ✓ Context optimization — Supported
- ✓ Re-read dedup — Supported
- ✓ Documents & media — Supported
- ✓ Privacy — Supported
- ✓ Secret redaction — Supported

## What isn't compressed

- Hooks don't run in a folder whose trust prompt wasn't accepted — `tokenade healthcheck` tells you.

## Install

    npm install -g @tokenade/cli
    tokenade install
    tokenade login

`tokenade uninstall` restores every file it touched.

## Read next

- https://tokenade.net/tokenade.md
- https://tokenade.net/install.md
- https://tokenade.net/en/docs/compatibility
