CLI
Every storefront workflow — scaffold, develop, deploy — runs through the Cimplify CLI.
Install
curl -fsSL https://cimplify.io/install | shDetects your OS + arch, downloads the matching binary from the latest GitHub release, verifies its sha256, and drops it in ~/.local/bin/cimplify. Cold start ≈ 20 ms. The binary bundles every template and the full component registry, so init, add, and list work the same as deploy, logs, env, and the rest — no separate @cimplify/sdk install required.
Pin a version or change the install location:
curl -fsSL https://cimplify.io/install | sh -s -- --version cli-v0.1.0
curl -fsSL https://cimplify.io/install | sh -s -- --prefix ~/.cimplifyNeed to run it once without installing? bunx @cimplify/cli <command> (or npx, pnpm dlx) works too — slower cold start, same behavior.
Zero to production
For the scannable ten-command flow, see the TL;DR. The rest of this page is the per-subcommand reference.
Subcommand index
Scaffold & develop
| Command | What it does |
|---|---|
cimplify init | Scaffold a Next.js storefront from one of six templates. |
cimplify add / cimplify list | Eject one of 67 registry components into your project. |
cimplify dev [--remote] | Run your project's dev script (optionally with prod env). |
cimplify-mock | Boot the local mock API on :8787. Ships with @cimplify/sdk. |
Auth
| Command | What it does |
|---|---|
cimplify login | Browser-first OAuth Authorization Code + PKCE on a loopback redirect. --api-key is the CI escape hatch. |
cimplify logout | Forget saved credentials. |
cimplify whoami | Show the current account and business. |
Projects & deploys
| Command | What it does |
|---|---|
cimplify projects ls | List projects in the current business. |
cimplify projects create <name> | Create a new Next.js project. |
cimplify link <project-id> | Link CWD to a Cimplify project (writes .cimplify/project.json). |
cimplify unlink | Remove the local project link. |
cimplify deploy | Push current SHA + trigger a build (preview by default; --prod for production). |
cimplify rollback <deploy-id> | Re-deploy a previous deployment's SHA. |
cimplify status | Show the latest deployment for the linked project. |
cimplify logs [--follow] | Stream build logs. |
Env & domains
| Command | What it does |
|---|---|
cimplify env ls / pull / push / add / rm | Manage env vars per scope: development | preview | production. |
cimplify domains ls / add / verify / rm / attach / detach / primary | Manage business-scoped domains; attach to projects per env. |
Global flags for agents and CI
Two global flags apply to every cloud subcommand and let scripts (or LLM agents) drive the CLI deterministically.
| Flag | Equivalent env | What it does |
|---|---|---|
--json | CIMPLIFY_JSON=1 | Emit a single JSON envelope on stdout instead of colorized progress. Success: { "ok": true, "data": ... }. Failure: { "ok": false, "error": { "code", "message", "remediation"? } }. All human chatter (step, success, info) is suppressed; the envelope is the agent's only parse target. |
--yes, -y | CIMPLIFY_YES=1 | Auto-confirm every yes/no prompt. Without it, a non-TTY run that needs confirmation throws INTERACTIVE_REQUIRED rather than guessing. |
Exit codes are distinct per error class so callers can branch on $? without parsing output: NOT_LINKED=4, NOT_LOGGED_IN=20, NETWORK_ERROR=10, AUTH_FAILED=21, INVALID_INPUT=30, ABORTED=3, INTERACTIVE_REQUIRED=7, NOT_FOUND=9. Full list in @cimplify/cli/errors.
# Headless CI auth
cimplify login --api-key dk_live_xxx --json
# Capture latest deployment state
DEPLOY=$(cimplify status --json)
# Trigger and wait, parsing JSON outcome
cimplify deploy --prod --yes --json# Success
{"ok":true,"data":{"deployment":{"id":"dep_01H…","git_sha":"abc…","environment":"production","status":"active","url":"https://…"}}}
# Failure
{"ok":false,"error":{"code":"NOT_LINKED","message":"no linked project in this directory","remediation":"run `cimplify link <project-id>`"}}In --json mode the browser PKCE login path refuses (interactive); use --api-key to authenticate non-interactively.
Mock API
The mock storefront API ships in @cimplify/sdk because it's tightly coupled to the SDK's domain types and seed data. Once the SDK is installed in your project, boot it with bunx @cimplify/sdk mock (or the cimplify-mock bin directly). Full surface in the mock reference.
Where next
-
init: scaffold a storefront Six templates, working in 60 seconds.
-
login: browser-first OAuth PKCE on a loopback redirect.
-
deploy: push and ship Preview, prod, rollback, logs.
-
mock: local API Eight seeds, frozen clocks, webhooks.