Skip to content

Latest commit

 

History

History
73 lines (51 loc) · 2.71 KB

File metadata and controls

73 lines (51 loc) · 2.71 KB
title Quickstart
description Start the live graph watcher
icon bolt

1. Run Supermodel in your repo

cd /path/to/your/repo
supermodel

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.

After setup, or on any already configured repo, the same command starts the live graph watcher:

[supermodel] [step:1] Building code graph
[supermodel] [step:2] Starting listeners
[supermodel] [step:3] Ready — listening on UDP :7734

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.

2. Tell your agent the graph files exist

supermodel skill >> CLAUDE.md
# or AGENTS.md, .cursorrules, etc.

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.

The prompt explains the naming convention (Foo.pyFoo.graph.py) and tells your agent to read the graph file before the source file.

3. Use the live graph

Goal Command
Find unreachable functions supermodel dead-code
See what a change impacts supermodel blast-radius path/to/file.go
Codebase health report supermodel audit
Find usages of a symbol supermodel find handleRequest
Token-efficient context for one file supermodel focus path/to/file.go
Print the full graph supermodel graph

These commands reuse the cached graph automatically. Pass --force to bypass the cache.

4. One-shot analysis

Use analyze when you want to build or refresh the graph once and exit instead of keeping the watcher running:

supermodel analyze

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.

5. Configure (optional)

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

api_key: smsk_live_...                       # or SUPERMODEL_API_KEY
api_base: https://api.supermodeltools.com    # or SUPERMODEL_API_BASE
output: human                                # human | json
shards: true                                 # set false (or SUPERMODEL_SHARDS=false) to skip writing graph files

Next

See the analyze command reference for one-shot flags and examples.