{
  "id": "wire.cli",
  "kind": "tooling",
  "summary": "Command-line workflow for local WireDiagram files.",
  "useWhen": [
    "a human or agent needs to create diagrams in a local file tree",
    "a CI job needs to validate stored Wire JSON before rendering",
    "a workflow needs SVG, JSON, or Mermaid exports without React"
  ],
  "contracts": [
    "wire-diagram",
    "wire-cli-commands",
    "wire-validation-result"
  ],
  "preferredPath": [
    "Run npx @aigentive/wire-cli help to inspect implemented commands.",
    "Create diagrams with wire init <id> and optional --template.",
    "Append nodes with wire add <kind> --diagram=<id> --title=<title>.",
    "Use --from=<id> or --from=<id.branch> to wire target-centric connections.",
    "Run wire validate <id> before wire export.",
    "Export SVG, JSON, or Mermaid as derived artifacts, not durable app state."
  ],
  "avoid": [
    "Do not expect CLI group editing; use MCP apply_actions or React for group commands.",
    "Do not use Mermaid export as the source of truth.",
    "Do not add --tools to tool nodes; --tools is only meaningful for ai nodes."
  ],
  "tools": [
    {
      "name": "wire init",
      "purpose": "Create a new local diagram, optionally from a built-in template."
    },
    {
      "name": "wire add",
      "purpose": "Append a node and optionally set from, branches, model, tools, ref, body, and tone."
    },
    {
      "name": "wire validate",
      "purpose": "Run schema and structural validation; exits non-zero for errors."
    },
    {
      "name": "wire export",
      "purpose": "Export SVG, JSON, or Mermaid from canonical WireDiagram JSON."
    },
    {
      "name": "wire ls",
      "purpose": "List local diagrams in recency order."
    }
  ],
  "routes": [
    {
      "path": "/llm/cli.shape.json",
      "mediaType": "application/json",
      "purpose": "CLI commands and workflow guardrails."
    }
  ],
  "related": [
    "wire.agent",
    "wire.schema",
    "wire.validation",
    "wire.recipes"
  ]
}
