๐ชจ why use many token when few token do trick โ Claude Code skill that cuts 65% of tokens by talking like caveman
CLI for code graphs and MCP in agent workflows
Supermodel CLI scans a repository, builds graph data for files and symbols, and writes .graph shards next to source files. Agents can read those shards through normal file search, or you can expose the same graph tools through the built-in MCP server.
Builders who want their agent to read repo relationships, impact, and dead code from files instead of from a large pasted context.
You can give your agent repository-wide dependency and call information without manually explaining the codebase each time.
What it does
Writes graph files next to source
Generates .graph.* shards for each source file so agents can pick up relationships through normal file reading.
Finds dead code
The dead-code command uses static analysis to surface unreachable functions.
Shows blast radius
The blast-radius command shows which files and functions are affected by a file, function, or diff.
Provides token-efficient context slices
The focus command returns imports, callers, and types for one file in a compact form.
Serves graph tools over MCP
The mcp command starts a stdio MCP server with analyze, dead_code, blast_radius, and get_graph tools.
Supports live Claude Code updates
The hook command forwards file-change events, and the setup wizard can install the Claude Code hook automatically.
How to get it
- 1Run
brew install supermodeltools/tap/supermodel
- 2Run
curl -fsSL https://supermodeltools.com/install | sh
- 3Run
git clone https://github.com/supermodeltools/cli cd cli go build -o supermodel .
- 4Run
cd your/repo supermodel # first run: launches setup wizard, then watches for changes
README
Supermodel CLI
Save 40%+ on agent token costs with code graphs.
Supermodel maps every file, function, and call relationship in your repo and writes a .graph file next to each source file. Your agent reads them automatically via grep and cat. No prompt changes. No extra context windows. No new tools to learn.
๐ Full CLI docs: docs.supermodeltools.com/cli/install
Linux / Mac
curl -fsSL https://supermodeltools.com/install | sh
npm (cross-platform)
npm install -g @supermodeltools/cli
How it works
1. Map your codebase
supermodel
Uploads your repo to the Supermodel API, builds a full call graph, and writes .graph shard files next to every source file. Stays running to keep files updated as you code.
2. Your agent reads the graph automatically
.graph files are plain text. Any agent that can read files โ Claude Code, Cursor, Copilot, Windsurf โ picks them up automatically through its native search & file reading tools. No configuration needed on the agent side.
3. Ask anything
Your agent now has full visibility into your call graph, imports, domains, and blast radius โ for every file in the repo, not just the ones open in the editor.
Works with any AI agent
.graph files are plain text read via grep and cat. There is no agent-specific integration required.
| Agent | Setup |
|---|---|
| Claude Code | Run supermodel; install the hook for live updates (setup wizard handles this) |
| Cursor | Run supermodel; .graph files appear in context when you open any source file |
| GitHub Copilot | Run supermodel; open .graph files in the editor to include them in context |
| Windsurf | Same as Cursor |
| Aider | Run supermodel, then pass --read '**/*.graph.*' to include all graph files |
| Any other agent | Run supermodel โ if it can read files, it can read .graph files |
For live updates in Claude Code, add this hook to .claude/settings.json:
{
"hooks": {
"PostToolUse": [{
"matcher": "Write|Edit",
"hooks": [{"type": "command", "command": "supermodel hook"}]
}]
}
}
The supermodel setup wizard installs this automatically if Claude Code is detected.
Installation
macOS
brew install supermodeltools/tap/supermodel
Linux / macOS (curl)
curl -fsSL https://supermodeltools.com/install | sh
On first run, supermodel launches the setup wizard automatically when attached to a terminal.
From source
git clone https://github.com/supermodeltools/cli
cd cli
go build -o supermodel .
Quick start
cd your/repo
supermodel # first run: launches setup wizard, then watches for changes
Commands
File mode
Manages .graph.* shards written next to each source file. Agents read these without making API calls.
| Command | Description |
|---|---|
analyze [path] | Upload repo, run full analysis, write .graph.* files (--no-shards skips file writing) |
skill | Print agent awareness prompt โ pipe to CLAUDE.md or AGENTS.md |
supermodel | Generate graph files on startup, then keep them updated incrementally |
clean [path] | Remove all .graph.* files from the repository |
hook | Claude Code PostToolUse hook โ forward file-change events to the supermodel daemon |
Tell your agent about graph files
Add the Supermodel graph-file prompt to CLAUDE.md, AGENTS.md, or your agent's instruction file:
supermodel skill >> CLAUDE.md
Or manually add:
This repository has .graph.* files next to source files containing code relationship data from Supermodel.
For src/Foo.py, the graph file is src/Foo.graph.py.
Each .graph file can include [deps], [calls], and [impact] sections.
Read the .graph file before the source file to understand dependencies, call relationships, and blast radius before making changes.
On-demand analysis
| Command | Description |
|---|---|
dead-code [path] | Find unreachable functions using static analysis (aliases: dc) |
blast-radius [file] | Show files and functions affected by changing a file, function, or diff (aliases: br, impact) |
audit | Codebase health report: circular deps, coupling metrics, high blast-radius files |
focus <file> | Token-efficient graph slice for a file โ imports, callers, types (aliases: ctx, context) |
find <symbol> | Find usages and callers of a symbol across the codebase |
graph [path] | Display the full repository graph (human table, JSON, or Graphviz DOT) |
Code tools
| Command | Description |
|---|---|
compact [path] | Strip comments and shorten identifiers to reduce token usage (aliases: pack, minify) |
docs [path] | Generate a static HTML architecture documentation site |
restore | Build a project context summary to restore Claude's understanding after context compaction |
Agent integration
| Command | Description |
|---|---|
mcp | Start a stdio MCP server exposing graph tools to Claude Code and other MCP hosts |
Auth and config
| Command | Description |
|---|---|
setup | Interactive setup wizard โ authenticate, configure file mode, install Claude Code hook |
login | Authenticate with your Supermodel account (browser or --token for CI) |
logout | Remove stored credentials |
status | Show authentication and cache status |
Add a badge to your README
[](https://supermodeltools.com)
Configuration
Save 40%+ on agent token costs โ start free โ supermodeltools.com/trial
Settings are stored at ~/.supermodel/config.yaml. Environment variables override file values.
api_key: smsk_... # or SUPERMODEL_API_KEY
api_base: https://... # or SUPERMODEL_API_BASE (default: https://api.supermodeltools.com)
output: human # human | json
files: true # set false to disable .graph.* writing globally (or SUPERMODEL_FILES=false)
For CI or non-interactive environments:
SUPERMODEL_API_KEY=smsk_live_... supermodel analyze
MCP setup
To expose Supermodel graph tools directly to Claude Code via the Model Context Protocol, add the server to ~/.claude/config.json:
{
"mcpServers": {
"supermodel": {
"command": "supermodel",
"args": ["mcp"]
}
}
}
Exposed MCP tools: analyze, dead_code, blast_radius, get_graph.
Links
| Save 40%+ on tokens โ start free | supermodeltools.com/trial |
| Website | supermodeltools.com |
| CLI Docs | docs.supermodeltools.com/cli/install |
| API Docs | api.supermodeltools.com |
| Dashboard | dashboard.supermodeltools.com |
| Twitter / X | @supermodeltools |
| Contact | abe@supermodel.software |
Questions? Open an issue or email abe@supermodel.software.
Files in the repo
- .github
- benchmark
- bucket
- cmd
- docs
- internal
- npm
- pkg
- scripts
- .editorconfig
- .gitignore
- .golangci.yaml
- .goreleaser.yaml
- .pre-commit-config.yaml
- CONTRIBUTING.md
- go.mod
- go.sum
- install.sh
- LICENSE
- main.go
- Makefile
- README.md
- supermodel.rb
Discussion (0)
Ask about usage, or say what you built with itSign in to join the discussion.
No comments yet. Be the first to say what this is good for.
More tools
The best-benchmarked open-source AI memory system. And it's free.
Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io
Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors
Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.