Skip to main content

Usage

devgraph run <service> [options]

Arguments

ArgumentDescription
serviceName of the service to run

Options

OptionDescriptionDefault
--graph <path>Path to graph.json.devgraph/graph.json
--jsonOutput as JSON-
--runbookGenerate a markdown runbook for AI agents-
--execExecute the run plan (start all services)-

Description

Generates a startup plan for a service, including all its dependencies in the correct order. Uses topological sorting to ensure dependencies start before dependents.

Examples

Show the run plan for a service:
devgraph run api-gateway
Output:
╭─────────────────────────────────────────────╮
│  Run Plan: api-gateway                      │
╰─────────────────────────────────────────────╯

Dependencies (run in order):
┌───┬─────────────────┬─────────────────────────────┐
│ # │ Service         │ Command                     │
├───┼─────────────────┼─────────────────────────────┤
│ 1 │ postgres        │ docker-compose up -d db     │
│ 2 │ user-service    │ pnpm dev --filter user      │
│ 3 │ product-service │ pnpm dev --filter product   │
│ 4 │ api-gateway     │ pnpm dev --filter gateway   │
└───┴─────────────────┴─────────────────────────────┘

Run with: devgraph run api-gateway --exec
Generate a runbook for AI agents:
devgraph run api-gateway --runbook
Creates .devgraph/runbooks/api-gateway.md with step-by-step instructions. Execute all services:
devgraph run api-gateway --exec
Starts all services in dependency order with healthcheck waits.

Output

ModeOutput
DefaultFormatted table in terminal
--jsonJSON object with plan details
--runbookMarkdown file at .devgraph/runbooks/<service>.md
--execSpawns processes for each service