magus-refs
List where an ingested code symbol is defined and referenced
Synopsis
magus refs <symbol> [flags]
Description
List where an ingested code symbol is defined and every file that references it, as file:line rows drawn from the SCIP index.
This is the occurrence-shaped view a symbol's fan-in needs: a flat list, which is what you want when the question is "who calls this". The node-link neighborhood that magus query renders is the wrong shape for that question, which is why this is its own command rather than a flag.
The argument is a symbol node ID (symbol:...) or a name that resolves to one. Symbols come from a declared SCIP index; see knowledge.symbols in the configuration. A workspace with no index has no symbols to report, and says so rather than falling back to a text search - a grep result and an index result answer different questions, and quietly substituting one for the other is how a wrong answer looks right.
Options
- --occurrences
- Every exact source range, uncapped and verified against the tree - the view a mechanical edit needs, where the default line list is capped and describes fan-in
- --refresh
- Re-ingest the SCIP index before answering
Examples
Every reference to a symbol
magus refs Open
By fully-qualified node ID
magus refs symbol:github.com/egladman/magus/Open
As JSON
magus refs Open -o json
See Also
magus(1), magus-ls(1), magus-describe(1), magus-run(1), magus-x(1), magus-where(1), magus-affected(1), magus-graph(1), magus-query(1), magus-explain(1), magus-path(1), magus-watch(1), magus-events(1), magus-status(1), magus-clean(1), magus-vcs(1), magus-doctor(1), magus-config(1), magus-session(1), magus-memory(1), magus-notes(1), magus-diff(1), magus-server(1), magus-mcp(1), magus-buzz(1), magus-completion(1), magus-man(1), magus-init(1), magus-agent(1), magus-self(1), magus-version(1)