Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions cli/commands/analyze.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ supermodel analyze [path] [flags]

| Flag | Description |
|---|---|
| `--three-file` | Generate `.calls`/`.deps`/`.impact` files instead of a single `.graph` |
| `--no-shards` | Skip writing `.graph.*` shard files |
| `--force` | Re-analyze even if a cached result exists |
| `-o, --output` | Output format: `human` \| `json` |
Expand All @@ -29,9 +28,6 @@ supermodel analyze [path] [flags]
# Analyze the current directory
supermodel analyze

# Generate three-file shards (recommended)
supermodel analyze --three-file

# Re-analyze without using the cache, output JSON
supermodel analyze --force -o json

Expand Down
2 changes: 1 addition & 1 deletion cli/commands/docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: 'docs'
description: 'Generate static architecture documentation for a repository'
---

Generates a static HTML site documenting the architecture of a codebase. The command uploads the repository to the Supermodel API, converts the returned code graph to markdown, and builds a browsable static site with search, dependency graphs, taxonomy navigation, and SEO metadata. The site also emits machine-readable artifacts (JSON-LD and `LLMS.txt`) alongside the HTML.
Generates a static HTML site documenting the architecture of a codebase. The command uploads the repository to the Supermodel API, converts the returned code graph to markdown, and builds a browsable static site with search, dependency graphs, taxonomy navigation, and SEO metadata. The site also emits machine-readable artifacts (JSON-LD and `llms.txt`) alongside the HTML.

The output directory can be served locally or deployed to any static host (GitHub Pages, Vercel, Netlify, Cloudflare Pages).

Expand Down
6 changes: 3 additions & 3 deletions cli/commands/hook.mdx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
title: 'hook'
description: 'Forward Claude Code file-change events to the watch daemon'
description: 'Forward Claude Code file-change events to the Supermodel daemon'
---

Reads a Claude Code `PostToolUse` JSON payload from stdin and forwards the file path to the running watch daemon via UDP. Install as a `PostToolUse` hook in `.claude/settings.json`.
Reads a Claude Code `PostToolUse` JSON payload from stdin and forwards the file path to the running Supermodel daemon via UDP. Install as a `PostToolUse` hook in `.claude/settings.json`.

## Synopsis

Expand All @@ -15,7 +15,7 @@ supermodel hook [flags]

| Flag | Description |
|---|---|
| `--port` | UDP port of the watch daemon (default `7734`) |
| `--port` | UDP port of the Supermodel daemon (default `7734`) |
| `-h, --help` | Help for hook |

## Example
Expand Down
6 changes: 3 additions & 3 deletions cli/commands/watch.mdx → cli/commands/supermodel.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: 'supermodel'
description: 'Run the watch daemon (the bare command)'
description: 'Run the live graph daemon (the bare command)'
---

Runs a full analysis on startup (using the cached graph if available), then enters daemon mode. Listens for file-change notifications from the `supermodel hook` command and incrementally re-renders affected `.graph.*` sidecar files. Press Ctrl+C to stop and remove graph files.
Expand All @@ -13,7 +13,7 @@ supermodel [flags]

## Description

The bare `supermodel` command is the watch daemon. It does not take a subcommand — running it with no arguments starts the long-running process.
The bare `supermodel` command is the live graph daemon. It does not take a subcommand — running it with no arguments starts the long-running process.

By default the daemon listens on UDP (port `7734`) for change notifications pushed by `supermodel hook`. For environments without a hook integration, pass `--fs-watch` to also poll git state (`HEAD`, index mtime, dirty files) every `--poll-interval`.

Expand All @@ -36,7 +36,7 @@ By default the daemon listens on UDP (port `7734`) for change notifications push
# Start the daemon in the current directory
supermodel

# Watch a specific project, poll git state as a fallback
# Run on a specific project, poll git state as a fallback
supermodel --dir ./my-project --fs-watch

# Use a custom UDP port if 7734 is taken
Expand Down
8 changes: 1 addition & 7 deletions cli/install.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ icon: 'download'

A single Go binary, no runtime dependencies.

## Homebrew

```bash
brew install supermodeltools/tap/supermodel
```

## curl

```bash
Expand Down Expand Up @@ -44,5 +38,5 @@ supermodel update --check # check without installing
```bash
supermodel logout
rm -rf ~/.supermodel
brew uninstall supermodel # or remove the binary from your PATH
rm "$(command -v supermodel)" # or remove the binary from your PATH manually
```
2 changes: 1 addition & 1 deletion cli/quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Settings live at `~/.supermodel/config.yaml`. Environment variables override fil
api_key: smsk_live_... # or SUPERMODEL_API_KEY
api_base: https://api.supermodeltools.com # or SUPERMODEL_API_BASE
output: human # human | json
files: true # set false (or SUPERMODEL_FILES=false) to skip writing sidecars
shards: true # set false (or SUPERMODEL_SHARDS=false) to skip writing graph files
```

## Next
Expand Down
2 changes: 1 addition & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
{
"group": "Commands",
"pages": [
"cli/commands/watch",
"cli/commands/supermodel",
"cli/commands/analyze",
"cli/commands/audit",
"cli/commands/blast-radius",
Expand Down
22 changes: 9 additions & 13 deletions index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ title: Introduction

## CLI quickstart

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 watch daemon — one command, end to end.
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.

### 1. Install

```bash
curl -fsSL https://supermodeltools.com/install.sh | sh
```

Other options: `brew install supermodeltools/tap/supermodel`, `npm install -g @supermodeltools/cli`, or build from source. See [Installation](/cli/install).
Other options: `npm install -g @supermodeltools/cli` or build from source. See [Installation](/cli/install).

### 2. Run the setup wizard

Expand All @@ -37,7 +37,7 @@ The wizard walks four steps:
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.
4. **Shard mode** — enables writing `.graph.*` sidecars next to your source files.

It then runs the watch daemon for you. Press `Ctrl+C` to stop.
It then runs the live graph daemon for you. Press `Ctrl+C` to stop.

### 3. Tell your agent the sidecars exist

Expand All @@ -52,31 +52,27 @@ The prompt explains the naming convention (`Foo.py` → `Foo.graph.py`), the thr

### 4. What you get

After setup runs with `--three-file` (recommended), each source file gets three sidecars:
After setup runs, each source file gets one `.graph.*` sidecar with dependency, call, and impact sections:

```
src/
├── login.go
├── login.calls.go ← who calls what, with file:line
├── login.deps.go ← imports and imported-by
└── login.impact.go ← risk level, domains, blast radius
└── login.graph.go ← deps, calls, impact, domains, and blast radius
```

Real output from running the CLI on its own source (`cmd/login.*.go`):
Example output shape from a generated graph file:

```go
// cmd/login.deps.go
// cmd/login.graph.go
// [deps]
// imports internal/auth/doc.go
// imports internal/auth/handler.go
// imported-by main.go

// cmd/login.calls.go
// [calls]
// init → LoginWithToken internal/auth/handler.go:109
// init → Login internal/auth/handler.go:29

// cmd/login.impact.go
// [impact]
// risk MEDIUM
// domains CoreConfig · SupermodelAPI
Expand All @@ -89,7 +85,7 @@ Your agent reads these via `cat` and `grep` like any other file. No prompt chang

### 5. Keep it running

The bare `supermodel` command is the watch daemon. Run it any time you want sidecars to stay fresh as you code:
The bare `supermodel` command is the live graph daemon. Run it any time you want graph files to stay fresh as you code:

```bash
supermodel
Expand All @@ -98,7 +94,7 @@ supermodel
For one-shot analysis (no daemon), use:

```bash
supermodel analyze --three-file
supermodel analyze
```

### 6. What to do with the graph
Expand Down
Loading