i.2Wiki
Agentic AI Atlas · @v6/graph-tools
generators/toolsa5c.ai
I.
Wiki article

generators/tools

Reading · 1 min

@v6/graph-tools reference

Utility package for loading the v6 catalog graph, querying it from scripts or a CLI, and rendering deterministic generator templates.

Page nodewiki/generators/tools/README.mdNearby pages · 1Documents · 0

Continue reading

Nearby pages in the same section.

@v6/graph-tools

Utility package for loading the v6 catalog graph, querying it from scripts or a CLI, and rendering deterministic generator templates.

CLI

bash
Push-Location graph/wiki/generators/tools; npm install; Pop-Location
node graph/wiki/generators/tools/src/cli.mjs stats --root graph
node graph/wiki/generators/tools/src/cli.mjs nodes --root graph --kind AgentProduct
node graph/wiki/generators/tools/src/cli.mjs get --root graph agent:a5c --json
node graph/wiki/generators/tools/src/cli.mjs edges --root graph agent:a5c --direction outgoing
node graph/wiki/generators/tools/src/cli.mjs render --root graph --template wiki/generators/templates/examples/layers.md.tmpl --kind Layer --stdout

Library

js
import { loadGraph, createQuery, renderTemplate } from "@v6/graph-tools";

const graph = await loadGraph({ rootDir: "." });
const query = createQuery(graph);
const layers = query.nodesByKind("Layer");
const markdown = renderTemplate("{{#each nodes}}- {{id}}\n{{/each}}", { nodes: layers });

Generator specs

generate runs a YAML/JSON spec:

yaml
id: stack-layers-example
query:
  kind: Layer
  sort: attributes.position
render:
  template: wiki/generators/templates/examples/layers.md.tmpl
output:
  path: wiki/generated/layers.md

Outputs are written with \n line endings and a sibling .manifest.json containing the input node ids and SHA-256 content hash.