stella graph
Query the code graph built by stella init — definitions, references, imports, importers, and neighbors.
Ask the code graph structural questions about your workspace: where a symbol is defined, who references it, what a file imports, who imports it, or a file's immediate neighborhood. It is fully offline — it reads .stella/codegraph.db and needs no API key.
Synopsis
stella graph <op> <target>What it does
stella graph reads the code-graph index that stella init builds at <workspace>/.stella/codegraph.db. Because it only reads that local index, it makes no model calls and needs no provider credential — it is instant and works on a plane.
<op> is one of five operations, and <target> is interpreted according to the operation:
<op> | <target> is | Answers |
|---|---|---|
definitions | a symbol name | Where is this symbol defined? |
references | a symbol name | Where is this symbol used? |
imports | a workspace-relative file path | What does this file import? |
importers | a workspace-relative file path | Which files import this file? |
neighbors | a workspace-relative file path | What is this file's immediate graph neighborhood? |
Run stella init first. The graph is only as current as the last init — if you have moved or renamed a lot of code since, re-run init to rebuild .stella/codegraph.db.
Examples
Find where a symbol is defined and who uses it:
stella graph definitions resolve_provider_config
stella graph references resolve_provider_configInspect a file's imports, its importers, and its neighborhood:
stella graph imports stella-cli/src/config.rs
stella graph importers stella-cli/src/config.rs
stella graph neighbors stella-cli/src/config.rs