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

axiom create message

Scaffold a new protobuf message in messages/messages.proto

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 message

Scaffold a new protobuf message in messages/messages.proto

Append a new message block to messages/messages.proto.

All messages live in a single file so they can reference each other without any import statements. Each generated block includes:

• A detached HINTS block explaining proto syntax (ignored by the registry)
• A leading doc-comment placeholder — edit this to document your message
• Example placeholder fields showing correct syntax — replace or remove them

When --fields is provided the placeholder fields are replaced with the supplied field definitions and the HINTS block is omitted. This is useful for scripted or agent workflows where the field types are already known.

Comments written directly above a message or field (no blank line between the comment and the declaration) are extracted at publish time and shown in the Axiom registry as documentation.

After adding the message, axiom generate is run automatically to produce language bindings in gen/.

Examples:

axiom create message OrderRequest
axiom create message AddInput --fields "double a=1; double b=2"
axiom create message MathResult --fields "double result=1"
axiom create message ConvRequest --fields "session_id:string; user_message:string"

Usage

axiom create message <Name> [flags]

Flags

FlagShorthandTypeDefaultDescription
--fieldsstringSemicolon-separated field definitions. Accepts canonical proto3 ("string name = 1"), proto3 without field numbers ("string name"), or colon shorthand ("name:string"). Field numbers are auto-assigned when omitted.
--help-hboolhelp for message
--no-generateboolSkip running axiom generate after adding the message (useful when creating multiple messages before generating)

See also