Skip to main content

Usage

devgraph query "<question>" [options]

Options

OptionDescriptionDefault
--graph <path>Path to graph.json.devgraph/graph.json
--budget <n>Approximate word budget for the response500
--jsonPrint the structured result as JSONfalse
--helpShow help

Description

devgraph query works against the built local graph in .devgraph/graph.json. It ranks files and snippets using repo-grounded signals such as:
  • file path
  • symbol names
  • extracted chunk text
  • nearby graph edges such as imports and references
The command emits a bounded result with:
  • matched files
  • matching snippets with line ranges
  • nearby graph edges

Example Questions

devgraph query "where is devgraph build implemented"
devgraph query "how does devgraph watch work"
devgraph query "where is syncProject defined" --budget 300

Output Shape

Query output includes:
  • ranked file matches
  • snippets with line ranges
  • related edges from the graph
This makes it useful for humans and coding agents that need a narrow, explainable slice of the repo.

Typical Workflow

devgraph build .
devgraph query "where is devgraph build implemented"
Use devgraph query when broad file search is too noisy and you want focused graph-backed evidence.