Stelladocs
Commands

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> isAnswers
definitionsa symbol nameWhere is this symbol defined?
referencesa symbol nameWhere is this symbol used?
importsa workspace-relative file pathWhat does this file import?
importersa workspace-relative file pathWhich files import this file?
neighborsa workspace-relative file pathWhat 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_config

Inspect 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

Stella is totally free and open source, dual-licensed MIT or Apache 2.0— your choice: MIT's three-paragraph simplicity, or Apache 2.0's explicit patent grant that enterprises prefer. Use it, fork it, embed it, ship it — no account, no phone-home, no strings. What that means →

On this page