---
title: "axiom create message"
description: "Scaffold a new protobuf message in messages/messages.proto"
category: reference
surfaces: [cli]
related: [reference/cli/axiom-create, guides/import-package-types]
last_reviewed: 2026-06-06
---

<!-- 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:

```text
• 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:
```text
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

```sh
axiom create message <Name> [flags]
```

## Flags

| Flag | Shorthand | Type | Default | Description |
|---|---|---|---|---|
| `--fields` |  | string |  | Semicolon-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` | `-h` | bool |  | help for message |
| `--no-generate` |  | bool |  | Skip running axiom generate after adding the message (useful when creating multiple messages before generating) |

## See also

- [axiom create](./axiom-create.md) — Create Axiom resources
- Guide: [Import package types](../../guides/import-package-types.md)
