CLI Commands

build

Compile a documentation directory into graph.json.

Terminal window
lito-graph build -i ./docs -o ./graph.json

Options

FlagRequiredDefaultDescription
-i, --input <path>YesPath to the docs folder
-o, --output <path>No./graph.jsonOutput 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.

Terminal window
# From pre-built graph
lito-graph serve -g ./graph.json
# Build and serve in one step
lito-graph serve -i ./docs

Options

FlagRequiredDefaultDescription
-g, --graph <path>NoPath to pre-built graph.json
-i, --input <path>NoPath 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.

Terminal window
lito-graph inspect -g ./graph.json --stats

Options

FlagRequiredDefaultDescription
-g, --graph <path>YesPath to graph.json
--statsNoDefaultShow graph statistics
--nodesNoList all nodes
--type <type>NoFilter nodes by type
--node <id>NoShow details for a specific node
--edgesNoList all edges
--orphansNoShow nodes with no edges
--unresolvedNoShow unresolved references

Multiple flags can be combined. If no flag is provided, --stats is the default.