axon init

Scaffold a new project in the current directory.

axon init <name>              # an agent
axon <kind> init <name>       # any other kind

axon module init <name>
axon cognet init <name>
axon ext init <name>

Creates <name>/, installs dependencies, and generates the type frame — there is no separate prepare step after init. It always scaffolds into the current directory and never picks a location for you.

Kinds

An agent is the default, so it needs no kind word. Every other kind names itself, and the verb is identical across all of them.

CommandCreatesConfig
axon init <name>An agent — the only kind that runsaxon.config.ts
axon module init <name>A capability an agent installsmodule.config.ts
axon cognet init <name>A compiled braincognet.config.ts
axon bench init <name>A benchmark suitebench.config.ts
axon prompt init <name>A publishable prompt packageprompt.config.ts
axon ext init <name>A terminal extensionextension.config.ts

The kind word is a prefix on the whole verb set, not just initaxon module prepare and axon module publish exist for the same reason, and act on the directory you are in. The bare forms (axon prepare, axon publish) detect the kind from the config file, so the prefix is only needed when acting from outside the project.

What an agent gets

<name>/
├── src/
   └── boot.vue      # runs once at startup
├── axon.config.ts    # the agent
├── package.json
└── bunfig.toml       # registry mapping for @axon/*

Deliberately minimal. Every surface an agent can have — src/tools/, src/scripts/, server/api/, modules/, data/knowledge/, tests/ — is discovered by scanning, and an absent directory means the same thing as an empty one. Scaffolding them all would make a new agent read like a framework you have to grow into.

The config is defineAgent({}). Inference is inherited from your profile's providers:, so a fresh agent runs with no configuration at all. Add modules:, policy: or a model: preference when you need them — or let axon install add modules: for you.

See Agent Structure for what each folder is for.

Options

FlagDefaultDescription
--jsonfalsePrint one line of JSON to stdout and nothing else

Errors

ErrorCause
AGENT_NAME_REQUIREDNo name was given
PROJECT_EXISTSThe target directory already exists