Skip to content

Commit c5fef6b

Browse files
docs: make CLI quickstart watcher-first
1 parent c4072be commit c5fef6b

2 files changed

Lines changed: 37 additions & 25 deletions

File tree

cli/quickstart.mdx

Lines changed: 30 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
11
---
22
title: 'Quickstart'
3-
description: 'Authenticate and run your first analysis'
3+
description: 'Start the live graph watcher'
44
icon: 'bolt'
55
---
66

7-
## 1. Authenticate
7+
## 1. Run Supermodel in your repo
88

99
```bash
10-
supermodel login
10+
cd /path/to/your/repo
11+
supermodel
1112
```
1213

13-
Opens your browser, creates an API key, and saves it to `~/.supermodel/config.yaml`. For CI, pass the key directly:
14+
On first run, `supermodel` opens the setup flow automatically. It authenticates you, confirms the repo, offers to install the Claude Code hook, and enables `.graph.*` sidecar files.
1415

15-
```bash
16-
supermodel login --token smsk_live_...
16+
After setup, the same command starts the live graph watcher:
17+
18+
```text
19+
[supermodel] [step:1] Building code graph
20+
[supermodel] [step:2] Starting listeners
21+
[supermodel] [step:3] Ready — listening on UDP :7734
1722
```
1823

19-
## 2. Analyze a repo
24+
Leave it running while you code. It updates the graph when files change, writes graph sidecars next to source files, and cleans generated sidecars when you stop it with `Ctrl+C`.
25+
26+
## 2. Tell your agent the graph files exist
2027

2128
```bash
22-
cd /path/to/your/repo
23-
supermodel analyze
29+
supermodel skill >> CLAUDE.md
30+
# or AGENTS.md, .cursorrules, etc.
2431
```
2532

26-
Uploads the repo, runs call graph + dependency + domain analysis, caches the result locally by content hash, and writes `.graph.*` sidecar files next to each source file.
33+
The prompt explains the naming convention (`Foo.py``Foo.graph.py`) and tells your agent to read the graph file before the source file.
2734

28-
## 3. Use the results
35+
## 3. Use the live graph
2936

3037
| Goal | Command |
3138
|---|---|
@@ -36,9 +43,19 @@ Uploads the repo, runs call graph + dependency + domain analysis, caches the res
3643
| Token-efficient context for one file | `supermodel focus path/to/file.go` |
3744
| Print the full graph | `supermodel graph` |
3845

39-
Subsequent commands reuse the cached graph automatically. Pass `--force` to any command to bypass the cache.
46+
These commands reuse the cached graph automatically. Pass `--force` to bypass the cache.
47+
48+
## 4. One-shot analysis
49+
50+
Use `analyze` when you want to build or refresh the graph once and exit instead of keeping the watcher running:
51+
52+
```bash
53+
supermodel analyze
54+
```
55+
56+
`analyze` uploads the repo, runs call graph + dependency + domain analysis, caches the result locally by content hash, and writes `.graph.*` sidecar files next to source files. Add `--no-shards` to skip writing sidecars.
4057

41-
## 4. Configure (optional)
58+
## 5. Configure (optional)
4259

4360
Settings live at `~/.supermodel/config.yaml`. Environment variables override file values.
4461

index.mdx

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ title: Introduction
1313

1414
## CLI quickstart
1515

16-
The fastest path: install the binary and run `setup`. The wizard authenticates you, detects your repo, offers to install the Claude Code hook, and starts the live graph daemon — one command, end to end.
16+
The fastest path: install the binary, go to your repo, and run `supermodel`. On first run it handles setup automatically; after that it starts the live graph watcher.
1717

1818
### 1. Install
1919

@@ -23,21 +23,16 @@ curl -fsSL https://supermodeltools.com/install.sh | sh
2323

2424
Other options: `npm install -g @supermodeltools/cli` or build from source. See [Installation](/cli/install).
2525

26-
### 2. Run the setup wizard
26+
### 2. Start the live graph watcher
2727

2828
```bash
2929
cd /path/to/your/repo
30-
supermodel setup
30+
supermodel
3131
```
3232

33-
The wizard walks four steps:
34-
35-
1. **Authentication** — opens your browser to create an API key and saves it to `~/.supermodel/config.yaml`.
36-
2. **Repository** — detects the git root and confirms the directory.
37-
3. **Agent hook** — if Claude Code is installed, offers to add a `PostToolUse` hook so `.graph.*` files refresh on every `Write`/`Edit`. Cursor, Copilot, Windsurf, and Aider read the files directly — no hook needed.
38-
4. **Shard mode** — enables writing `.graph.*` sidecars next to your source files.
33+
If this is your first run, `supermodel` launches setup automatically. It authenticates you, confirms the repo, offers to install the Claude Code hook, and enables writing `.graph.*` sidecars next to source files.
3934

40-
It then runs the live graph daemon for you. Press `Ctrl+C` to stop.
35+
Then `supermodel` builds the graph and stays running as the live watcher. Press `Ctrl+C` to stop and clean generated sidecars.
4136

4237
### 3. Tell your agent the sidecars exist
4338

@@ -52,7 +47,7 @@ The prompt explains the naming convention (`Foo.py` → `Foo.graph.py`), the thr
5247

5348
### 4. What you get
5449

55-
After setup runs, each source file gets one `.graph.*` sidecar with dependency, call, and impact sections:
50+
After the watcher runs, each source file gets one `.graph.*` sidecar with dependency, call, and impact sections:
5651

5752
```
5853
src/
@@ -85,7 +80,7 @@ Your agent reads these via `cat` and `grep` like any other file. No prompt chang
8580

8681
### 5. Keep it running
8782

88-
The bare `supermodel` command is the live graph daemon. Run it any time you want graph files to stay fresh as you code:
83+
The bare `supermodel` command is the live graph watcher. Run it any time you want graph files to stay fresh as you code:
8984

9085
```bash
9186
supermodel

0 commit comments

Comments
 (0)