Skip to main content

Installation

Install DevGraph globally or use npx:
npm install -g devgraph
Using @latest with npx ensures you always get the newest version.

1. Add blocks to your Markdown

In any .md file (e.g., docs/architecture.md), add devgraph blocks:
## API Service

```devgraph-service
name: api
type: node
commands:
  dev: npm run dev
  build: npm run build
depends:
  - database
service: api
routes:
  GET /health: Health check
  GET /api/users: List users
  POST /api/users: Create user
service: api
vars:
  PORT: "3000"
  DATABASE_URL: postgresql://localhost:5432/mydb

## 2. Build the graph

```bash
devgraph build docs/*.md

3. Check outputs

Outputs are generated in .devgraph/:
.devgraph/
  |- graph.json
  |- summary.md
  |- agents/
    |- api.md
  |- system.mmd
  |- codemap.mmd
FileDescription
graph.jsonMachine-readable project graph
summary.mdHuman-readable overview with tables
agents/*.mdPer-service context files for LLMs
system.mmdMermaid diagram of service dependencies
codemap.mmdMermaid diagram of repo structure

4. Visualize with Studio

Launch the interactive graph viewer:
devgraph studio
Opens at http://localhost:9111 with:
  • Interactive node exploration
  • Service details panel
  • Search and filter by type

Next Steps