diff --git a/cli/commands/analyze.mdx b/cli/commands/analyze.mdx index c6cb2d9..08ae5d4 100644 --- a/cli/commands/analyze.mdx +++ b/cli/commands/analyze.mdx @@ -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` | @@ -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 diff --git a/cli/commands/docs.mdx b/cli/commands/docs.mdx index 1a9868e..c3eaa05 100644 --- a/cli/commands/docs.mdx +++ b/cli/commands/docs.mdx @@ -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). diff --git a/cli/commands/hook.mdx b/cli/commands/hook.mdx index 8089afa..0a1943b 100644 --- a/cli/commands/hook.mdx +++ b/cli/commands/hook.mdx @@ -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 @@ -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 diff --git a/cli/commands/watch.mdx b/cli/commands/supermodel.mdx similarity index 83% rename from cli/commands/watch.mdx rename to cli/commands/supermodel.mdx index 022753b..5560a84 100644 --- a/cli/commands/watch.mdx +++ b/cli/commands/supermodel.mdx @@ -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. @@ -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`. @@ -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 diff --git a/cli/install.mdx b/cli/install.mdx index a0a516a..f0e8617 100644 --- a/cli/install.mdx +++ b/cli/install.mdx @@ -6,12 +6,6 @@ icon: 'download' A single Go binary, no runtime dependencies. -## Homebrew - -```bash -brew install supermodeltools/tap/supermodel -``` - ## curl ```bash @@ -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 ``` diff --git a/cli/quickstart.mdx b/cli/quickstart.mdx index 91ffa83..e170f5e 100644 --- a/cli/quickstart.mdx +++ b/cli/quickstart.mdx @@ -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 diff --git a/docs.json b/docs.json index 054f38f..f94d715 100644 --- a/docs.json +++ b/docs.json @@ -55,7 +55,7 @@ { "group": "Commands", "pages": [ - "cli/commands/watch", + "cli/commands/supermodel", "cli/commands/analyze", "cli/commands/audit", "cli/commands/blast-radius", diff --git a/index.mdx b/index.mdx index b234d3c..1319444 100644 --- a/index.mdx +++ b/index.mdx @@ -13,7 +13,7 @@ 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 @@ -21,7 +21,7 @@ The fastest path: install the binary and run `setup`. The wizard authenticates y 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 @@ -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 @@ -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 @@ -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 @@ -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