II.
Page JSON
Structured · livepage:generators-tools
@v6/graph-tools json
Inspect the normalized record payload exactly as the atlas UI reads it.
{
"id": "page:generators-tools",
"_kind": "Page",
"_file": "wiki/generators/tools/README.md",
"_cluster": "wiki",
"attributes": {
"nodeKind": "Page",
"title": "@v6/graph-tools",
"displayName": "@v6/graph-tools",
"slug": "generators/tools",
"articlePath": "wiki/generators/tools/README.md",
"article": "# @v6/graph-tools\n\nUtility package for loading the v6 catalog graph, querying it from scripts or a CLI, and rendering deterministic generator templates.\n\n## CLI\n\n```bash\nPush-Location graph/wiki/generators/tools; npm install; Pop-Location\nnode graph/wiki/generators/tools/src/cli.mjs stats --root graph\nnode graph/wiki/generators/tools/src/cli.mjs nodes --root graph --kind AgentProduct\nnode graph/wiki/generators/tools/src/cli.mjs get --root graph agent:a5c --json\nnode graph/wiki/generators/tools/src/cli.mjs edges --root graph agent:a5c --direction outgoing\nnode graph/wiki/generators/tools/src/cli.mjs render --root graph --template wiki/generators/templates/examples/layers.md.tmpl --kind Layer --stdout\n```\n\n## Library\n\n```js\nimport { loadGraph, createQuery, renderTemplate } from \"@v6/graph-tools\";\n\nconst graph = await loadGraph({ rootDir: \".\" });\nconst query = createQuery(graph);\nconst layers = query.nodesByKind(\"Layer\");\nconst markdown = renderTemplate(\"{{#each nodes}}- {{id}}\\n{{/each}}\", { nodes: layers });\n```\n\n## Generator specs\n\n`generate` runs a YAML/JSON spec:\n\n```yaml\nid: stack-layers-example\nquery:\n kind: Layer\n sort: attributes.position\nrender:\n template: wiki/generators/templates/examples/layers.md.tmpl\noutput:\n path: wiki/generated/layers.md\n```\n\nOutputs are written with `\\n` line endings and a sibling `.manifest.json` containing the input node ids and SHA-256 content hash.\r\n\r\n",
"documents": []
},
"outgoingEdges": [],
"incomingEdges": [
{
"from": "page:generators",
"to": "page:generators-tools",
"kind": "contains_page"
}
]
}