Skip to main content

Usage

devgraph build [paths...] [options]

Arguments

ArgumentDescriptionDefault
pathsFiles, directories, or globs to scancurrent workspace
If you omit paths, DevGraph scans the current workspace root.

Options

OptionDescription
--out-dir <dir>Output directory for generated artifacts
--forceBypass the shrink guard if a rebuild gets much smaller
--jsonPrint the sync result as JSON
--helpShow help

What Build Does

devgraph build is a one-shot sync into local memory:
  1. Collect inputs from files, directories, or globs
  2. Apply default ignores and .devgraphignore
  3. Hash candidate files
  4. Compare against .devgraph/manifest.json
  5. Re-extract only changed files
  6. Merge per-file cache artifacts into .devgraph/graph.json
  7. Write the updated manifest and graph back to disk

Ignore Rules

DevGraph excludes common noise by default, including:
  • .git/
  • .devgraph/
  • node_modules/
  • dist/
  • build/
  • .next/
  • examples/
  • internal-docs/
  • apps/docs/
  • static exports and public assets
  • lockfiles and generated metadata
You can add a repo-local .devgraphignore file with .gitignore syntax to exclude more paths.

Incremental Cache

Build stores per-file extraction state in .devgraph/cache/. manifest.json records file hashes and extraction version so unchanged files can be reused.

Examples

Build the current repo:
devgraph build .
Build selected paths:
devgraph build apps packages
Force a rebuild to overwrite a large shrink:
devgraph build . --force

Output

Build writes the following files to .devgraph/:
FileDescription
manifest.jsonIndexed paths, hashes, kinds, extraction version, and sync time
graph.jsonCanonical code-memory graph
cache/*.jsonPer-file extracted artifacts