Tooling

Wire CLI

Author Wire diagrams from the command line. Init from templates, add nodes, validate, and export to SVG / JSON / Mermaid.

Terminal
# global install
npm install -g @aigentive/wire-cli

# or run ad-hoc
npx @aigentive/wire-cli help
Terminal
# Init from a built-in template
wire init my-flow --template=approval-flow --title="Approval flow"

# Add nodes (from is "<id>" or "<id>.<branch>")
wire add ai        --diagram=my-flow --title="Classify intent" \
                    --description="Route by customer intent" \
                    --from=incoming --model=gpt-5.4-mini
wire add tool      --diagram=my-flow --title="Search CRM" \
                    --from=classify --ref=crm.search --tools=crm_search
wire add condition --diagram=my-flow --title="Route" \
                    --from=classify --branches=sales,support,other

# Validate
wire validate my-flow

# Export
wire export my-flow --format=svg     --out=my-flow.svg
wire export my-flow --format=mermaid --out=my-flow.mmd
wire export my-flow --format=json    > my-flow.json

# List everything in the storage directory
wire ls
wire init <id> [flags]

Create a new diagram, optionally seeded from a template.

--title="…"Display title for the diagram.
--layout=LR|TB|RL|BTInitial layout direction (default LR).
--template=agent-workflow|approval-flow|rag-pipelineSeed nodes/edges from a built-in template.
wire add <kind> --diagram=<id> [flags]

Append a node of any kind to an existing diagram.

--diagram=<id>Diagram id to mutate (required).
--title="…"Title for the node (required).
--id=<id>Explicit node id; auto-generated when omitted.
--description="…"Body copy for the rendered node card.
--from=<id>Source node for the implicit edge (`id` or `id.branch`).
--branch=<name>Branch name when wiring from a condition node.
--branches=a,b,cComma-separated branches (only valid for `condition`).
--model=<model>Model name for `ai` nodes (gpt-5.4-mini, etc.).
--tools=a,b,cComma-separated id-safe tool names for `ai` nodes.
--ref=<tool.name>External tool/function reference for `tool` nodes.
--body="…"Body text for `note` nodes.
--tone=success|warning|error|info|aiVisual tone for the node.
wire validate <id>

Run schema + structural validation on a stored diagram. Exits non-zero with issue codes if invalid.

wire export <id> --format=svg|json|mermaid [--out=<path>]

Render or export a diagram. Writes to stdout when `--out` is omitted.

--format=svg|json|mermaidOutput format (required).
--out=<path>Write to file instead of stdout.
wire ls

List all diagrams in the storage directory (recency-sorted).

wire help

Print the inline help text. `--help` and `-h` work too.

bash
# per-command
wire ls --dir=/tmp/wire-diagrams

# environment
export WIRE_DIR=/Users/me/Documents/wire-diagrams
wire init my-flow
NextAPI · wire-core