Skip to content

Commit 50b581d

Browse files
docs: make CLI quickstart watcher-first
* docs: make CLI quickstart watcher-first * docs: address quickstart review comments * docs: clarify agent prompt append behavior * docs: clarify watcher refresh behavior
1 parent c4072be commit 50b581d

2 files changed

Lines changed: 46 additions & 28 deletions

File tree

cli/quickstart.mdx

Lines changed: 33 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
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+
If no config exists, `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, or on any already configured repo, 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 refreshes from hook notifications; if you are not using a hook, run `supermodel --fs-watch` to watch local file changes directly. It 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+
Use `>>` to append to existing instructions instead of replacing them. If the Supermodel block is already present, skip this step or remove the old block before running it again.
34+
35+
The prompt explains the naming convention (`Foo.py``Foo.graph.py`) and tells your agent to read the graph file before the source file.
2736

28-
## 3. Use the results
37+
## 3. Use the live graph
2938

3039
| Goal | Command |
3140
|---|---|
@@ -36,9 +45,19 @@ Uploads the repo, runs call graph + dependency + domain analysis, caches the res
3645
| Token-efficient context for one file | `supermodel focus path/to/file.go` |
3746
| Print the full graph | `supermodel graph` |
3847

39-
Subsequent commands reuse the cached graph automatically. Pass `--force` to any command to bypass the cache.
48+
These commands reuse the cached graph automatically. Pass `--force` to bypass the cache.
49+
50+
## 4. One-shot analysis
51+
52+
Use `analyze` when you want to build or refresh the graph once and exit instead of keeping the watcher running:
53+
54+
```bash
55+
supermodel analyze
56+
```
57+
58+
`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.
4059

41-
## 4. Configure (optional)
60+
## 5. Configure (optional)
4261

4362
Settings live at `~/.supermodel/config.yaml`. Environment variables override file values.
4463

@@ -51,4 +70,4 @@ shards: true # set false (or SUPERMODEL_SHARDS=f
5170
5271
## Next
5372
54-
See the [command reference](/cli/commands/analyze) for every command, flag, and example.
73+
See the [`analyze` command reference](/cli/commands/analyze) for one-shot flags and examples.

index.mdx

Lines changed: 13 additions & 14 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`. If no config exists, 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 no config exists, `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

@@ -48,11 +43,13 @@ supermodel skill >> CLAUDE.md
4843
# or AGENTS.md, .cursorrules, etc.
4944
```
5045

46+
Use `>>` to append to existing instructions instead of replacing them. If the Supermodel block is already present, skip this step or remove the old block before running it again.
47+
5148
The prompt explains the naming convention (`Foo.py``Foo.graph.py`), the three sections inside each sidecar (`[deps]`, `[calls]`, `[impact]`), and tells the agent to read the sidecar before the source file.
5249

5350
### 4. What you get
5451

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

5754
```
5855
src/
@@ -85,13 +82,15 @@ Your agent reads these via `cat` and `grep` like any other file. No prompt chang
8582

8683
### 5. Keep it running
8784

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

9087
```bash
9188
supermodel
9289
```
9390

94-
For one-shot analysis (no daemon), use:
91+
Live refreshes are driven by hook notifications. If you are not using a hook, run `supermodel --fs-watch` to watch local file changes directly.
92+
93+
For one-shot analysis (no watcher), use:
9594

9695
```bash
9796
supermodel analyze
@@ -109,4 +108,4 @@ Once a graph is cached, every other command reuses it instantly:
109108
| Find usages of a symbol | `supermodel find handleRequest` |
110109
| Token-efficient context for one file | `supermodel focus path/to/file.go` |
111110

112-
See the [command reference](/cli/commands/analyze) for every flag and example.
111+
Start with the [`supermodel` watcher reference](/cli/commands/supermodel) or the [`analyze` one-shot reference](/cli/commands/analyze).

0 commit comments

Comments
 (0)