Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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).

FlagShort / aliasesDescription
--name <NAME>-nProject name (required in one-shot mode). Letters, digits, - and _ only; must not start with ..
--on-chain <TOOL_ID>--on, --onchainOn-chain tool (e.g. aiken, scalus).
--off-chain <TOOL_ID>--off, --offchainOff-chain tool (e.g. meshjs, scalus).
--fullstack <TOOL_ID>-f, -p, --protocolOne 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, --infrastructureInfrastructure provider. Repeatable: --infra kupo --infra ogmios.
--devnet <TOOL_ID>-dDevnet tool (e.g. yaci).
--formal-methods <TOOL_ID>--formal, --formalmethodsFormal-methods tool (e.g. blaster).
--nixAlso generate a Nix flake (flake.nix + .envrc) for the project’s dependencies.
--no-specSkip the spec/ protocol-specification folder. Generated by default; interactive setup asks whether to include it (default Yes).
--allow-experimental-e, --experimentalOpt in to experimental tools.
--dry-run--dryrunShow what would be generated without writing to disk.
--ignore-warning--ignore-warningsScaffold a combination the compatibility check flags as incompatible.
--format <FORMAT>human (default) or json.
--help / --version-h / -VPrint 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
FlagDescription
--tableShow 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
FlagShort / aliasesDescription
--on-chain <TOOL_ID>--on, --onchainOn-chain tool (replaces the current one, if any).
--off-chain <TOOL_ID>--off, --offchainOff-chain tool (replaces the current one, if any).
--fullstack <TOOL_ID>-f, -p, --protocolFullstack tool for both roles as one protocol/ component.
--infra <TOOL_ID>-i, --infrastructureInfrastructure provider to add (repeatable).
--devnet <TOOL_ID>-dDevnet tool (replaces the current one, if any).
--formal-methods <TOOL_ID>--formal, --formalmethodsFormal-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
FlagShort / aliasesDescription
--on-chain--on, --onchainRemove the on-chain component.
--off-chain--off, --offchainRemove the off-chain component.
--infra <TOOL_ID>-i, --infrastructureRemove an infrastructure provider by id (repeatable).
--devnet-dRemove the devnet component.
--formal-methods--formal, --formalmethodsRemove 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.

FlagShort / aliasesDescription
--dry-run--dryrunShow the change set without writing anything.
--forceUpdate even when the git working tree has uncommitted changes (or isn’t a git repository).
--ignore-warning--ignore-warningsProceed even if the resulting off-chain ↔ provider combination is flagged incompatible.
--allow-experimental-e, --experimentalAllow experimental tools in the resulting selection.

Exit codes

CodeMeaning
0Success. Also returned for --dry-run, and when you answer No to the interactive confirmation.
1Runtime error: the target directory exists, a dirty git tree, I/O or rendering failures.
2Usage 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.