CLI reference

Install-free via npx chainship <command>. BYO-key commands write to a local index at .chainship/deployments.json. Account commands talk to the control plane (set CHAINSHIP_API_URL or pass --api).

Deploy & lifecycle

chainship deploy [dir]

Build (detects Next/Vite/Astro, or follows chainship.json) → optimize (minify) → hash every file → embed the client-side verifier (Service Worker + content-hash manifest, so the browser checks each asset against its hash and fails closed on a mismatch) → upload to Arweave → set the ENS contenthash on Sepolia. Note: the ENS pointer itself is not yet verified on-chain in the browser, so a host swapping the whole self-consistent bundle isn't caught yet.

FlagEffect
--managedPermanent deploy via your account, paid from credits (no funded key).
--x402 [--payment <tx>]Account-less pay-per-deploy (HTTP 402 + USDC). The paying wallet signs: PRIVATE_KEY if it is that wallet, else pass --payment-signature <sig>.
--previewPermanent deploy without moving the ENS pointer.
--skip-ensAlias of --preview: upload only, leave the ENS pointer untouched.
--no-verifySkip embedding the verifier (the browser won't tamper-check assets). Defaults on.
--estimatePrint the pay-once cost and exit.
--dry-runContent-address + estimate only. No keys needed.
--no-optimizeSkip minification. · --build force a rebuild.
--network <devnet|mainnet>Storage: mainnet is Arweave (default). devnet is test storage that is deleted after about 3 days.

In a terminal, a deploy ends with a small drawing whose blocks carry the first characters of the release's Arweave id. It never appears in a pipe or in CI. CHAINSHIP_NO_ART=1 turns it off.

chainship promote [id|txId] · rollback [id|txId]

Point the name at a chosen release, or without an argument at the one before the live one. Each move writes two records: the pointer, and the bundle id the browser checks the release against.

FlagEffect
--anchor <id>The bundle id to write. By default it comes from this machine's deploy record, or from the manifest that at least two gateways agree on.
--anchor noneFor a release made with --no-verify: clears the record, which switches the browser's pointer check off for the name.

The two records are two transactions, sent one right after the other. Until both have landed, and for up to 30 seconds after, browsers that already run the verifier may block the site.

chainship register <label>

Register a Sepolia ENS name for your deploy key so you never touch the ENS web app — chainship register myapp → myapp.eth, then chainship deploy can set its pointer.

FlagEffect
--years <n>Registration duration (default 1).
--saveWrite ENS_NAME to .env so the next deploy targets this name.
--dry-runCheck availability + rent only; send no transaction.

Uses @ensdomains/ensjs for correct, version-pinned addresses. It's a real on-chain spend (rent + gas, paid with free faucet ETH on testnet). The rent is printed first and the register call is simulated before broadcasting, so a revert costs no gas.

chainship dev [dir]

Build + serve locally exactly as a deploy would (--port, --watch, --spa).

chainship init [dir] --template <vanilla|vite|next>

Scaffold a deployable starter.

Account

CommandDoes
chainship login [--api]Wallet-signature login → stores a token.
chainship planPlan + capabilities.
chainship balanceCredit balance + ledger.
chainship redeem <txHash>Redeem a Base USDC payment into credits.
chainship analyticsSite analytics + embed snippet (paid).
chainship protect <txId>Create a token-gated preview link.
chainship treasuryOperator: treasury reconciliation (admin token).

Inspect

CommandDoes
chainship doctorPreflight env / RPC / key balance / ENS.
chainship statusRead the ENS name's on-chain contenthash.
chainship list (alias ls) · usageList deploys · local usage summary.
chainship bench <txId>Edge-cache speed: gateway vs cold vs warm.
chainship env set/ls/rmBuild-time env vars, per target, in .chainship/env.<target>.json. Public in the bundle: config, not secrets.
chainship env pull/pushCopy a name's vars between your account (the dashboard's Environment page) and the local file. deploy also pulls them; the shell and the local file win.

Project config (chainship.json)

Optional, at the repo root — overrides auto-detection:

{ "buildCommand": "npm run build", "outputDir": "dist", "rootDir": ".", "installCommand": "npm ci", "nodeVersion": "20" }