Repository navigation
craft-cli 2.0 brings the CLI in line with the current Craft Connect API and makes it safer and more predictable for scripts and AI agents.
Highlights
- Current Craft API. REST collection views and active view, reminders,
blocks learn, REST page styling, and correct search scopes (folderIds/documentIds). The pinned API contract is checked against the live docs on a schedule. - Agent-readable contract.
craft schemaemits a CLI Spec v0.2 document with declared effects for every command, and works with no config, auth or network.--request-schemaand--response-schemashow the pinned REST shapes. - Safe writes.
--dry-runeverywhere. Commands that can lose data require--yes. Writes return Craft's per-item results, and a partial failure exits 2. - Better errors.
error.kind, retryability, and Craft'sRetry-Afterand rate-limit details in JSON errors. MCP tool errors now fail instead of exiting 0. - Output. YAML and JSONL,
--fieldsand--transformon every structured format, and atomic--deliver file:output.
Upgrading from 1.x
These changes can affect existing scripts:
| Change | What to do |
|---|---|
13 commands that can lose data refuse without --yes: delete, clear, blocks delete, tasks delete, folders delete, collections delete, collections views delete, collections schema update, whiteboards delete, reminders delete, config reset, config remove, profiles remove. update --mode replace does too. |
Add --yes to scripts that run them. Edits, moves and renames are unchanged. |
craft mcp call requires --yes for tools other than craft_read and honors --dry-run. |
Add --yes to generic MCP write calls. |
| Writes return Craft's per-item results instead of a synthesized success; a partial failure exits 2. | Read items or operations. --format compact keeps 1.x formatting. |
craft schema emits CLI Spec v0.2 by default. |
Use craft schema --legacy for the 1.x manifest. |
craft skill-path prints skill content and metadata instead of a path. |
Read .content or the metadata fields. |
craft setup refuses without a terminal, and commands no longer offer interactive setup when no profile exists. |
Use craft profiles add-rest in automation. |
Invalid --format, --backend, --data-source and --deliver values fail before any request. |
Use a supported value. |
| No update notices on normal commands; the config file is written with mode 0600. | Run craft upgrade to check for updates. |
Full details: README and the audit report.
Install or upgrade
craft upgrade
# or
curl -fsSL https://raw.githubusercontent.com/nerveband/craft-cli/main/install.sh | bash