Skip to main content

Installation

Install DevGraph globally or run it directly:
pnpm add -g devgraph
pnpm dlx devgraph@latest build .
bunx devgraph@latest build .

1. Build the graph

devgraph build .
By default this indexes code, repo config, and root context files, then writes local artifacts to .devgraph/. You can also pass specific directories, files, or globs:
devgraph build apps packages

2. Check outputs

Artifacts are generated in .devgraph/:
.devgraph/
  |- manifest.json
  |- graph.json
  |- cache/
    |- <file-id>.json
FileDescription
manifest.jsonIndexed file metadata, hashes, and sync timestamps
graph.jsonCanonical local memory graph
cache/*.jsonPer-file extracted artifacts used for incremental sync

3. Check graph health

devgraph status
This shows indexed file count, changed file count, graph paths, and last sync time.

4. Query the graph

Use devgraph query when you want a focused answer from the built graph:
devgraph query "where is devgraph build implemented"
devgraph query "where is syncProject defined" --budget 250
The output is a bounded response with matched files, code snippets, and nearby graph edges.

5. Keep it fresh

Run watch mode while you work:
devgraph watch .
watch reuses the same sync engine as build and updates the local graph on file changes.

Next Steps

Build Command

Learn about the incremental sync loop and local artifacts.

Watch Command

Keep the graph fresh while you edit code.

Query Command

Retrieve focused evidence from the graph.

Status Command

Inspect graph freshness and indexed file counts.