You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: 'Authenticate and run your first analysis'
3
+
description: 'Start the live graph watcher'
4
4
icon: 'bolt'
5
5
---
6
6
7
-
## 1. Authenticate
7
+
## 1. Run Supermodel in your repo
8
8
9
9
```bash
10
-
supermodel login
10
+
cd /path/to/your/repo
11
+
supermodel
11
12
```
12
13
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.
14
15
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
17
22
```
18
23
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
20
27
21
28
```bash
22
-
cd /path/to/your/repo
23
-
supermodel analyze
29
+
supermodel skill >> CLAUDE.md
30
+
# or AGENTS.md, .cursorrules, etc.
24
31
```
25
32
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.
27
36
28
-
## 3. Use the results
37
+
## 3. Use the live graph
29
38
30
39
| Goal | Command |
31
40
|---|---|
@@ -36,9 +45,19 @@ Uploads the repo, runs call graph + dependency + domain analysis, caches the res
36
45
| Token-efficient context for one file |`supermodel focus path/to/file.go`|
37
46
| Print the full graph |`supermodel graph`|
38
47
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.
40
59
41
-
## 4. Configure (optional)
60
+
## 5. Configure (optional)
42
61
43
62
Settings live at `~/.supermodel/config.yaml`. Environment variables override file values.
Copy file name to clipboardExpand all lines: index.mdx
+13-14Lines changed: 13 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ title: Introduction
13
13
14
14
## CLI quickstart
15
15
16
-
The fastest path: install the binaryand 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.
17
17
18
18
### 1. Install
19
19
@@ -23,21 +23,16 @@ curl -fsSL https://supermodeltools.com/install.sh | sh
23
23
24
24
Other options: `npm install -g @supermodeltools/cli` or build from source. See [Installation](/cli/install).
25
25
26
-
### 2. Run the setup wizard
26
+
### 2. Start the live graph watcher
27
27
28
28
```bash
29
29
cd /path/to/your/repo
30
-
supermodel setup
30
+
supermodel
31
31
```
32
32
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.
39
34
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.
41
36
42
37
### 3. Tell your agent the sidecars exist
43
38
@@ -48,11 +43,13 @@ supermodel skill >> CLAUDE.md
48
43
# or AGENTS.md, .cursorrules, etc.
49
44
```
50
45
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
+
51
48
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.
52
49
53
50
### 4. What you get
54
51
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:
56
53
57
54
```
58
55
src/
@@ -85,13 +82,15 @@ Your agent reads these via `cat` and `grep` like any other file. No prompt chang
85
82
86
83
### 5. Keep it running
87
84
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:
89
86
90
87
```bash
91
88
supermodel
92
89
```
93
90
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:
95
94
96
95
```bash
97
96
supermodel analyze
@@ -109,4 +108,4 @@ Once a graph is cached, every other command reuses it instantly:
109
108
| Find usages of a symbol |`supermodel find handleRequest`|
110
109
| Token-efficient context for one file |`supermodel focus path/to/file.go`|
111
110
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