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.
| Flag | Effect |
|---|---|
--managed | Permanent 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>. |
--preview | Permanent deploy without moving the ENS pointer. |
--skip-ens | Alias of --preview: upload only, leave the ENS pointer untouched. |
--no-verify | Skip embedding the verifier (the browser won't tamper-check assets). Defaults on. |
--estimate | Print the pay-once cost and exit. |
--dry-run | Content-address + estimate only. No keys needed. |
--no-optimize | Skip 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.
| Flag | Effect |
|---|---|
--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 none | For 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.
| Flag | Effect |
|---|---|
--years <n> | Registration duration (default 1). |
--save | Write ENS_NAME to .env so the next deploy targets this name. |
--dry-run | Check 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
| Command | Does |
|---|---|
chainship login [--api] | Wallet-signature login → stores a token. |
chainship plan | Plan + capabilities. |
chainship balance | Credit balance + ledger. |
chainship redeem <txHash> | Redeem a Base USDC payment into credits. |
chainship analytics | Site analytics + embed snippet (paid). |
chainship protect <txId> | Create a token-gated preview link. |
chainship treasury | Operator: treasury reconciliation (admin token). |
Inspect
| Command | Does |
|---|---|
chainship doctor | Preflight env / RPC / key balance / ENS. |
chainship status | Read the ENS name's on-chain contenthash. |
chainship list (alias ls) · usage | List deploys · local usage summary. |
chainship bench <txId> | Edge-cache speed: gateway vs cold vs warm. |
chainship env set/ls/rm | Build-time env vars, per target, in .chainship/env.<target>.json. Public in the bundle: config, not secrets. |
chainship env pull/push | Copy 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" }