Public beta — not for production use. Data may be wiped at any time. Questions? Contact us.
Documentation menu

axiom create node

Scaffold a new node in nodes/

View as Markdown
<!-- GENERATED by docs/scripts/gen-cli-reference — DO NOT EDIT. Source of truth: the cobra command definitions in cmd/axiom/cmd/. Regenerate from the repo root with: go run ./docs/scripts/gen-cli-reference -->

axiom create node

Scaffold a new node in nodes/

Create a node implementation file and test file in nodes/, then update axiom.yaml.

The node name must be PascalCase. Input and output messages must be defined in messages/messages.proto or available from an imported package in gen/imports/.

If --input or --output are omitted and BOTH stdin and stdout are a terminal, the command prompts interactively with a numbered list of all available messages. Prompts and menus are written to stderr, so redirecting stdout never mixes a question into the command's output; when stdout is redirected the command does not prompt at all and requires the flags.

The comment block immediately above the function in the generated file is extracted by the publish pipeline and shown in the Axiom registry as this node's description — the same convention used for proto message leading comments. Edit the placeholder before publishing.

Examples:

axiom create node ProcessOrder --input OrderRequest --output OrderConfirmation
axiom create node ValidateOrder --input OrderRequest --output ValidationResult
axiom create node ProcessOrder   # interactive: prompts for input and output

Usage

axiom create node <Name> [flags]

Flags

FlagShorthandTypeDefaultDescription
--descriptionstringNode description (optional, can be set later in axiom.yaml)
--generic-portsstringMark this node Generic, naming which port(s) an Instance later maps onto a real type — "input", "output", or "input,output" (the port's own message should declare real, concrete, generalized fields — never zero fields)
--help-hboolhelp for node
--inputstringInput message name
--no-generateboolSkip regenerating the AxiomContext interface file while scaffolding (useful when creating multiple nodes before running axiom generate)
--outputstringOutput message name
--typestringNode type: unary (default) or pipeline

See also