en un clic
en un clic
| name | tokenforge |
| description | TokenForge — Full-stack LLM token optimization engine |
TokenForge compresses ALL token sources in your Claude Code sessions — code, command output, conversation, JSON, and MCP schemas — with AST-aware intelligence.
/tokenforge statsShow compression statistics for the current session.
tokenforge stats --json
/tokenforge analyzeAnalyze token usage patterns — identifies session type (debugging, code review, feature build) and gives optimization recommendations.
tokenforge analyze
/tokenforge budget [total]View or set per-category token budgets.
# View current budget
tokenforge budget --show
# Set total budget to 80,000 tokens
tokenforge budget --set 80000
/tokenforge qualityShow compression quality score (0-100) for the current session.
tokenforge quality
/tokenforge learnBuild a project relevance profile from git history and file access patterns.
tokenforge learn --project .
/tokenforge expand <hash>Retrieve the full original content by its blake3 hash. Use when compressed output has lost information you need.
tokenforge expand abc123def456
TokenForge sits in the PostToolUse hook and compresses tool output before it enters the context window:
All originals are stored losslessly in SQLite (zstd-compressed). Use tokenforge expand to retrieve any original.
# Build from source
cd tokenforge/core && cargo build --release
# Install
cp target/release/tokenforge ~/.cargo/bin/
# Add hook to Claude Code settings
# ~/.claude/settings.json:
# {
# "hooks": {
# "PostToolUse": [
# { "command": "/path/to/tokenforge/hooks/compress-output.sh" }
# ]
# }
# }