---
title: "Publish a flow to the marketplace"
description: "Compile a flow.yaml with axiom flow compile, then promote the artifact to the public marketplace with axiom flow publish so other tenants can fork it or import it as a subflow."
category: guide
surfaces: [cli, canvas]
related: [getting-started/first-flow, concepts/nodes-packages-flows, concepts/execution-model, guides/flow-configs, reference/glossary]
last_reviewed: 2026-06-17
---

# Publish a flow to the marketplace

`axiom flow publish` promotes a compiled flow to the public marketplace from
the command line — the same action the editor's **Publish** button performs.
Once published, every Axiom tenant can discover the flow, fork it, and import
it as a [subflow](/docs/concepts/nodes-packages-flows) inside their own flows.

You publish a **compiled artifact**, not a `flow.yaml` source file. So the two
steps are always compile, then publish:

```bash
# Compile the flow.yaml in the current directory; prints the artifact id.
axiom flow compile
# → compiled flow artifact 01J8Z6K3W9XQ4M7C2YB5N0A1RT

# Publish that artifact to the public marketplace.
axiom flow publish 01J8Z6K3W9XQ4M7C2YB5N0A1RT
```

## Prerequisites

- **A login session.** Both `axiom flow compile` and `axiom flow publish`
  require `axiom login`; publishing without it prints `Not logged in. Run
  "axiom login" first.` and exits.
- **A compiled artifact.** Run `axiom flow compile` first and copy the artifact
  id it prints. Publishing takes that id as its only positional argument.

## Publish a compiled artifact

```bash
axiom flow publish 01J8Z6K3W9XQ4M7C2YB5N0A1RT
```

Because publishing is irreversible, the command prints a confirmation prompt and
waits for `y` before doing anything:

```text
  Publishing flow 01J8Z6K3W9XQ4M7C2YB5N0A1RT makes it publicly visible to every Axiom tenant.
  This cannot be undone — published flows are immutable.

  Publish? [y/N]
```

On confirmation it makes the flow publicly visible and prints:

```text
✓ published flow 01J8Z6K3W9XQ4M7C2YB5N0A1RT
  visibility: public — marketplace-visible, forkable, importable as a subflow
  this version is immutable; compile a new flow to iterate further
```

A published artifact can never be edited or unpublished. To change a published
flow, edit its `flow.yaml`, run `axiom flow compile` again to get a **new**
artifact id, and publish that.

## Publish without the prompt (CI and scripts)

Pass `--yes` (`-y`) to skip the confirmation — required when stdin is not a
terminal, or the command blocks waiting for input:

```bash
axiom flow publish 01J8Z6K3W9XQ4M7C2YB5N0A1RT --yes
```

Add `--json` to emit a single machine-readable object instead of the human
lines, so a script (or an agent) can confirm the result programmatically:

```bash
axiom flow publish 01J8Z6K3W9XQ4M7C2YB5N0A1RT --yes --json
```

```json
{
  "artifact_id": "01J8Z6K3W9XQ4M7C2YB5N0A1RT",
  "visibility": "public"
}
```

## The flow CLI lifecycle

`axiom flow publish` is the last verb in the command-line flow lifecycle. The
full set of `axiom flow` verbs takes a flow from an empty file to a public
artifact without ever opening the canvas:

| Verb | What it does |
|------|--------------|
| `axiom flow new <name>` | Scaffold a starter `<name>.flow.yaml` with two example nodes and an edge. |
| `axiom flow validate [flow.yaml]` | Run local structural checks (required fields, unique node ids, edge shape). No login needed. Add `--json` for structured output. |
| `axiom flow compile [flow.yaml]` | Resolve each node against the registry, auto-lay-out unpinned nodes, and compile the graph into a runnable artifact. Prints the artifact id. Requires login. Add `--json`. |
| `axiom flow run <artifact-id>` | Invoke a compiled artifact and print its result. Pass input with `--data`/`-d` (default `{}`), wait time with `--timeout` (default 60 s), and `--json` for the full response. Requires login. |
| `axiom flow pull <artifact-id>` | Materialize an existing compiled artifact back into an editable `flow.yaml` (`--out`/`-o`, default `flow.yaml`). |
| `axiom flow publish <artifact-id>` | Promote a compiled artifact to the public marketplace. Requires login. |

A typical command-line session runs them in order:

```bash
axiom flow new greeter                 # write greeter.flow.yaml
axiom flow validate greeter.flow.yaml  # local sanity check
axiom flow compile greeter.flow.yaml   # → artifact id
axiom flow run 01J8Z6… -d '{"name":"Ada"}'   # try it
axiom flow publish 01J8Z6…             # share it
```

## CLI and editor publish are the same action

`axiom flow publish` and the editor's **Publish** dialog are the same
action — both promote the artifact to the same public marketplace listing
with the same final visibility. Publishing from the CLI and publishing from
the canvas produce an identical marketplace listing; use whichever surface you
are already in.

With this verb, all three Axiom artifact types now have full command-line ↔ UI
parity for both creating and publishing:

- **Nodes/packages** — `axiom push` then `axiom publish <package>@<version>`,
  or the console.
- **Flows** — `axiom flow compile` then `axiom flow publish <artifact-id>`, or
  the editor's Publish button.

## Next steps

- [Run your first flow](/docs/getting-started/first-flow) — build a `flow.yaml`
  and run it before you publish.
- [Nodes, packages, and flows](/docs/concepts/nodes-packages-flows) — how a
  published flow becomes an importable subflow.
- [Author packages and flows with Claude Code](/docs/guides/author-with-claude-code)
  — drive this whole lifecycle from an AI agent.
