Skip to content

Commit a195339

Browse files
greynewellclaude
andauthored
Rewrite README: outcome-led headline, how it works, multi-agent support (#57)
- Lead with outcome: "Your AI agent knows your entire codebase — not just the files it's looking at" instead of feature description - Add "How it works" section: 3-step flow from watch → graph files → ask - Add "Works with any AI agent" table: Claude Code, Cursor, Copilot, Windsurf, Aider, and any file-reading agent - Add README badge users can add to their own repos - Move Claude Code integration into the agent table instead of its own major section - Elevate `supermodel setup` in Quick start (was buried) - Keep all command reference and configuration content Closes #53 #54 Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 8511c36 commit a195339

File tree

1 file changed

+82
-45
lines changed

1 file changed

+82
-45
lines changed

README.md

Lines changed: 82 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,60 @@
11
# Supermodel CLI
22

3-
[![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux-lightgrey)](#installation)
4-
[![Website](https://img.shields.io/badge/web-supermodeltools.com-blueviolet)](http://supermodeltools.com)
5-
[![API](https://img.shields.io/badge/API-api.supermodeltools.com-blue)](https://api.supermodeltools.com)
3+
Your AI agent knows your entire codebase — not just the files it's looking at.
64

7-
Give your AI coding agent a map of your codebase.
5+
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.
86

9-
Supermodel CLI connects AI coding agents to the [Supermodel API](https://api.supermodeltools.com), providing call graphs, dependency graphs, dead code detection, and blast radius analysis as context during your sessions. It operates in two modes: **file mode**, which writes `.graph.*` sidecar files next to your source so agents can read them at any time, and **on-demand analysis**, which runs targeted queries against the graph without touching the filesystem.
7+
```bash
8+
curl -fsSL https://supermodeltools.com/install.sh | sh
9+
```
1010

1111
---
1212

13-
## Links
13+
## How it works
1414

15-
| | |
15+
**1. Map your codebase**
16+
```bash
17+
supermodel watch
18+
```
19+
Uploads your repo to the Supermodel API, builds a full call graph, and writes `.graph` files next to every source file. Stays running to keep files updated as you code.
20+
21+
**2. Your agent reads the graph automatically**
22+
23+
`.graph` files are plain text. Any agent that can read files — Claude Code, Cursor, Copilot, Windsurf — picks them up automatically through its normal file-reading tools. No configuration needed on the agent side.
24+
25+
**3. Ask anything**
26+
27+
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.
28+
29+
---
30+
31+
## Works with any AI agent
32+
33+
`.graph` files are plain text read via grep and cat. There is no agent-specific integration required.
34+
35+
| Agent | Setup |
1636
|---|---|
17-
| **Website** | [supermodeltools.com](http://supermodeltools.com) |
18-
| **API Docs** | [api.supermodeltools.com](https://api.supermodeltools.com) |
19-
| **Dashboard** | [dashboard.supermodeltools.com](https://dashboard.supermodeltools.com) |
20-
| **Twitter / X** | [@supermodeltools](https://x.com/supermodeltools) |
21-
| **Contact** | [abe@supermodel.software](mailto:abe@supermodel.software) |
37+
| **Claude Code** | Run `supermodel watch`; install the hook for live updates (setup wizard handles this) |
38+
| **Cursor** | Run `supermodel watch`; `.graph` files appear in context when you open any source file |
39+
| **GitHub Copilot** | Run `supermodel watch`; open `.graph` files in the editor to include them in context |
40+
| **Windsurf** | Same as Cursor |
41+
| **Aider** | Run `supermodel watch`, then pass `--read '**/*.graph.*'` to include all graph files |
42+
| **Any other agent** | Run `supermodel watch` — if it can read files, it can read `.graph` files |
43+
44+
For live updates in Claude Code, add this hook to `.claude/settings.json`:
45+
46+
```json
47+
{
48+
"hooks": {
49+
"PostToolUse": [{
50+
"matcher": "Write|Edit",
51+
"hooks": [{"type": "command", "command": "supermodel hook"}]
52+
}]
53+
}
54+
}
55+
```
56+
57+
The `supermodel setup` wizard installs this automatically if Claude Code is detected.
2258

2359
---
2460

@@ -30,12 +66,14 @@ Supermodel CLI connects AI coding agents to the [Supermodel API](https://api.sup
3066
brew install supermodeltools/tap/supermodel
3167
```
3268

33-
### Linux
69+
### Linux / macOS (curl)
3470

3571
```bash
3672
curl -fsSL https://supermodeltools.com/install.sh | sh
3773
```
3874

75+
Runs the setup wizard automatically on first install when attached to a terminal.
76+
3977
### From source
4078

4179
```bash
@@ -49,10 +87,9 @@ go build -o supermodel .
4987
## Quick start
5088

5189
```bash
52-
supermodel login # authenticate (browser or --token for CI)
90+
supermodel setup # authenticate + configure (runs automatically after install)
5391
cd /path/to/your/repo
54-
supermodel analyze # upload repo, run analysis, write .graph.* files
55-
supermodel status # confirm auth and cache state
92+
supermodel watch # generate graph files and keep them updated
5693
```
5794

5895
---
@@ -61,12 +98,12 @@ supermodel status # confirm auth and cache state
6198

6299
### File mode
63100

64-
These commands manage `.graph.*` sidecar files written next to each source file. Agents and MCP tools read these files without making API calls.
101+
Manages `.graph.*` sidecar files written next to each source file. Agents read these without making API calls.
65102

66103
| Command | Description |
67104
|---|---|
68105
| `analyze [path]` | Upload repo, run full analysis, write `.graph.*` files (use `--no-files` to skip) |
69-
| `watch [path]` | Generate graph files on startup, then keep them updated incrementally as you code |
106+
| `watch [path]` | Generate graph files on startup, then keep them updated incrementally |
70107
| `clean [path]` | Remove all `.graph.*` files from the repository |
71108
| `hook` | Claude Code `PostToolUse` hook — forward file-change events to the `watch` daemon |
72109

@@ -85,9 +122,9 @@ These commands manage `.graph.*` sidecar files written next to each source file.
85122

86123
| Command | Description |
87124
|---|---|
88-
| `compact [path]` | Strip comments and shorten identifiers to reduce token usage while preserving semantics (aliases: `pack`, `minify`) |
125+
| `compact [path]` | Strip comments and shorten identifiers to reduce token usage (aliases: `pack`, `minify`) |
89126
| `docs [path]` | Generate a static HTML architecture documentation site |
90-
| `restore` | Build a project context summary to restore Claude's understanding after a context compaction |
127+
| `restore` | Build a project context summary to restore Claude's understanding after context compaction |
91128

92129
### Agent integration
93130

@@ -99,12 +136,23 @@ These commands manage `.graph.*` sidecar files written next to each source file.
99136

100137
| Command | Description |
101138
|---|---|
139+
| `setup` | Interactive setup wizard — authenticate, configure file mode, install Claude Code hook |
102140
| `login` | Authenticate with your Supermodel account (browser or `--token` for CI) |
103141
| `logout` | Remove stored credentials |
104142
| `status` | Show authentication and cache status |
105143

106144
---
107145

146+
## Add a badge to your README
147+
148+
```markdown
149+
[![Supermodel](https://img.shields.io/badge/supermodel-enabled-blueviolet)](https://supermodeltools.com)
150+
```
151+
152+
[![Supermodel](https://img.shields.io/badge/supermodel-enabled-blueviolet)](https://supermodeltools.com)
153+
154+
---
155+
108156
## Configuration
109157

110158
Settings are stored at `~/.supermodel/config.yaml`. Environment variables override file values.
@@ -124,32 +172,9 @@ SUPERMODEL_API_KEY=smsk_live_... supermodel analyze
124172

125173
---
126174

127-
## Claude Code integration
128-
129-
### Hook setup
130-
131-
The `hook` command forwards file-change events from Claude Code to the `supermodel watch` daemon so graph files stay current as your agent edits code. Add the following to `.claude/settings.json`:
132-
133-
```json
134-
{
135-
"hooks": {
136-
"PostToolUse": [{
137-
"matcher": "Write|Edit",
138-
"hooks": [{"type": "command", "command": "supermodel hook"}]
139-
}]
140-
}
141-
}
142-
```
143-
144-
Then start the daemon in your repo:
145-
146-
```bash
147-
supermodel watch
148-
```
175+
## MCP setup
149176

150-
### MCP setup
151-
152-
To expose Supermodel graph tools directly to Claude Code, add the MCP server to `~/.claude/config.json`:
177+
To expose Supermodel graph tools directly to Claude Code via the Model Context Protocol, add the server to `~/.claude/config.json`:
153178

154179
```json
155180
{
@@ -166,4 +191,16 @@ Exposed MCP tools: `analyze`, `dead_code`, `blast_radius`, `get_graph`.
166191

167192
---
168193

194+
## Links
195+
196+
| | |
197+
|---|---|
198+
| **Website** | [supermodeltools.com](http://supermodeltools.com) |
199+
| **API Docs** | [api.supermodeltools.com](https://api.supermodeltools.com) |
200+
| **Dashboard** | [dashboard.supermodeltools.com](https://dashboard.supermodeltools.com) |
201+
| **Twitter / X** | [@supermodeltools](https://x.com/supermodeltools) |
202+
| **Contact** | [abe@supermodel.software](mailto:abe@supermodel.software) |
203+
204+
---
205+
169206
*Questions? Open an issue or email [abe@supermodel.software](mailto:abe@supermodel.software).*

0 commit comments

Comments
 (0)