CLI Commands
build
Compile a documentation directory into graph.json.
lito-graph build -i ./docs -o ./graph.jsonOptions
| Flag | Required | Default | Description |
|---|---|---|---|
-i, --input <path> | Yes | — | Path to the docs folder |
-o, --output <path> | No | ./graph.json | Output file path |
Output
Prints a summary with node counts by type, edge counts by type, and any unresolved reference warnings.
serve
Start an MCP server exposing the graph via stdio transport.
# From pre-built graphlito-graph serve -g ./graph.json
# Build and serve in one steplito-graph serve -i ./docsOptions
| Flag | Required | Default | Description |
|---|---|---|---|
-g, --graph <path> | No | — | Path to pre-built graph.json |
-i, --input <path> | No | — | Path to docs folder (builds graph on startup) |
One of --graph or --input is required.
Behavior
- All logging goes to stderr (stdout is reserved for MCP JSON-RPC)
- The server exposes 7 tools and 2 resources
- Stays running until the parent process terminates
inspect
Query and inspect a built graph from the command line.
lito-graph inspect -g ./graph.json --statsOptions
| Flag | Required | Default | Description |
|---|---|---|---|
-g, --graph <path> | Yes | — | Path to graph.json |
--stats | No | Default | Show graph statistics |
--nodes | No | — | List all nodes |
--type <type> | No | — | Filter nodes by type |
--node <id> | No | — | Show details for a specific node |
--edges | No | — | List all edges |
--orphans | No | — | Show nodes with no edges |
--unresolved | No | — | Show unresolved references |
Multiple flags can be combined. If no flag is provided, --stats is the default.