Command reference
cardano-init [OPTIONS] # create a project (interactive, or one-shot with --name)
cardano-init list [--table] # list roles and tools
cardano-init doctor # check this project's dependencies
cardano-init add [ROLE FLAGS] # add or replace a tool in the current project
cardano-init remove [ROLE FLAGS] # remove a role or infrastructure provider
cardano-init help [COMMAND] # print help
Every command accepts the global --format <human|json> flag (default human). See For coding agents for the JSON output.
Create a project
cardano-init # interactive mode
cardano-init --name my-app --on-chain aiken # one-shot, single role
cardano-init --name my-app --on-chain aiken --off-chain meshjs --nix
cardano-init -n my-app -p scalus -d yaci # short flags
With --name, the command runs in one-shot mode and never prompts. Without it, the command starts the interactive setup. Any other creation flag without --name is an error (name_required).
| Flag | Short / aliases | Description |
|---|---|---|
--name <NAME> | -n | Project name (required in one-shot mode). Letters, digits, - and _ only; must not start with .. |
--on-chain <TOOL_ID> | --on, --onchain | On-chain tool (e.g. aiken, scalus). |
--off-chain <TOOL_ID> | --off, --offchain | Off-chain tool (e.g. meshjs, scalus). |
--fullstack <TOOL_ID> | -f, -p, --protocol | One tool for both on-chain and off-chain, generated as a single protocol/ component. Can’t be combined with --on-chain / --off-chain. |
--infra <TOOL_ID> | -i, --infrastructure | Infrastructure provider. Repeatable: --infra kupo --infra ogmios. |
--devnet <TOOL_ID> | -d | Devnet tool (e.g. yaci). |
--formal-methods <TOOL_ID> | --formal, --formalmethods | Formal-methods tool (e.g. blaster). |
--nix | Also generate a Nix flake (flake.nix + .envrc) for the project’s dependencies. | |
--no-spec | Skip the spec/ protocol-specification folder. Generated by default; interactive setup asks whether to include it (default Yes). | |
--allow-experimental | -e, --experimental | Opt in to experimental tools. |
--dry-run | --dryrun | Show what would be generated without writing to disk. |
--ignore-warning | --ignore-warnings | Scaffold a combination the compatibility check flags as incompatible. |
--format <FORMAT> | human (default) or json. | |
--help / --version | -h / -V | Print help / version. |
Short flags and aliases behave exactly like the long flag. Errors and JSON output always use the long name. If the project directory already exists and is not empty, the command stops with dir_exists.
list
List the available roles and tools, including each tool’s language, status, documentation, supporting tooling, and community links.
cardano-init list # detailed, grouped by role
cardano-init list --table # compact matrix of tools by role
cardano-init list --format json # machine-readable catalog
| Flag | Description |
|---|---|
--table | Show a compact matrix of tools by role (human output only). |
doctor
Run doctor inside a generated project. It finds the project’s components, checks that the toolchains they need are installed, and prints the install command for each one that is missing. It also lists the supporting tools (editor extensions, language servers) and the community channels for those components.
cd my-protocol
cardano-init doctor
cardano-init doctor --format json
add
Add a tool to the project in the current directory, or replace the tool of a role. add takes the same role flags as project creation.
cardano-init add --on-chain plinth # replace the on-chain tool
cardano-init add --devnet yaci # add a devnet
cardano-init add --infra kupo --infra ogmios # add infrastructure providers
cardano-init add --fullstack scalus # switch to a fullstack protocol/ component
| Flag | Short / aliases | Description |
|---|---|---|
--on-chain <TOOL_ID> | --on, --onchain | On-chain tool (replaces the current one, if any). |
--off-chain <TOOL_ID> | --off, --offchain | Off-chain tool (replaces the current one, if any). |
--fullstack <TOOL_ID> | -f, -p, --protocol | Fullstack tool for both roles as one protocol/ component. |
--infra <TOOL_ID> | -i, --infrastructure | Infrastructure provider to add (repeatable). |
--devnet <TOOL_ID> | -d | Devnet tool (replaces the current one, if any). |
--formal-methods <TOOL_ID> | --formal, --formalmethods | Formal-methods tool (replaces the current one, if any). |
Plus the shared update flags.
remove
Remove a role, or one infrastructure provider, from the project in the current directory. Role flags take no value, except --infra, which takes the provider id.
cardano-init remove --devnet
cardano-init remove --infra ogmios
cardano-init remove --off-chain --formal-methods
| Flag | Short / aliases | Description |
|---|---|---|
--on-chain | --on, --onchain | Remove the on-chain component. |
--off-chain | --off, --offchain | Remove the off-chain component. |
--infra <TOOL_ID> | -i, --infrastructure | Remove an infrastructure provider by id (repeatable). |
--devnet | -d | Remove the devnet component. |
--formal-methods | --formal, --formalmethods | Remove the formal-methods component. |
Plus the shared update flags.
Shared update flags
add and remove read the project’s current tools from its component directories, apply the change, and update the shared top-level files (Justfile, README.md, AGENTS.md, …). By default they need a clean git working tree, so you can review the change with git diff and revert it.
| Flag | Short / aliases | Description |
|---|---|---|
--dry-run | --dryrun | Show the change set without writing anything. |
--force | Update even when the git working tree has uncommitted changes (or isn’t a git repository). | |
--ignore-warning | --ignore-warnings | Proceed even if the resulting off-chain ↔ provider combination is flagged incompatible. |
--allow-experimental | -e, --experimental | Allow experimental tools in the resulting selection. |
Exit codes
| Code | Meaning |
|---|---|
0 | Success. Also returned for --dry-run, and when you answer No to the interactive confirmation. |
1 | Runtime error: the target directory exists, a dirty git tree, I/O or rendering failures. |
2 | Usage or validation error: unknown tool, tool in the wrong role, invalid project name, missing --name, incompatible tools, … |
For the exact error, use --format json and read error.code. See Error codes.