CLI reference
text
stacklift [--json] [--api-url <url>] [--org <slug>] [--project <slug>] <command>Global flags work on every command and override stacklift.yaml.
| Variable | Purpose |
|---|---|
STACKLIFT_TOKEN | Personal access token (slp_…) or project secret key (slk_…) — the CI way to authenticate |
STACKLIFT_API_URL | API base URL. The published CLI defaults to the hosted Stacklift API; a build from source defaults to http://localhost:4000 |
NO_COLOR | Disable colours |
Output and exit codes
With --json, only the result goes to stdout; progress is written to stderr. Errors are { "ok": false, "error": { "message", "hint" } }.
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error |
| 2 | Usage or configuration problem |
| 3 | Not authenticated |
| 4 | Network error |
| 5 | Timed out waiting |
| 6 | Release or deployment failed |
| 7 | Refused (for example an unsafe rollback) |
Authentication
stacklift login [--token <t>] [--email <e>] [--api-url <u>]stacklift logout— revokes the stored token and deletes it locallystacklift whoami
Projects
stacklift init [--org] [--project] [--stack] [--channel] [--runtime-version] [--yes] [--force]— detect the stack and writestacklift.yamlstacklift project liststacklift project create --name --stack --platforms android,ios --app-id com.acme.app
Releases
stacklift release create [--version <v>] [--build-number <n>] [--runtime-version <r>] [--artifact <platform:kind:path>…] [--native <platform:path>…] [--store-status <s>] [--channel <key>|--deploy] [--percentage n] [--auto-expand --interval m] [--max-failure-rate 0.05] [--resume] [--timeout s] [-m notes]— version, build number and app id are read from the project when not given.--artifactuploads and verifies a hosted artifact;--native(or an--artifactof kindnative-binary) records a store build without uploading it. See Store releases.stacklift release list [--status READY] [--limit n]stacklift release show <version>— artifacts with checksums, where it is served, install numbers (checks, downloads, installs, failures, devices) and recent deploymentsstacklift release compare <a> <b>— runtime compatibility, which artifacts changed, and whether one can safely replace the otherstacklift release archive <version>— hide a release you no longer need (refused while a channel serves it)stacklift release promote <version> --to <channel> [--percentage n]stacklift release rollback --channel <key> --to <version> --reason <text> [--dry-run]
--resume makes release create safe to re-run in CI: an existing release with the same version is reused and already-verified artifacts are skipped.
When an --artifact is a ui-layout, the CLI runs the layout checks before uploading anything, so a broken layout fails on your machine instead of on the server.
Server-driven UI
stacklift ui validate <file>— the same checks the server runs before signing a layout: the format, every component and property, https-only links, bindings, and the size and depth limits. Errors exit non-zero; warnings (usually typos in property names) do not.stacklift ui list— published layouts, newest first, with the channels serving each.stacklift ui pull <id> [-o <file>]— download a published layout to edit it locally (idis the short id fromui list).stacklift ui export <file> --screen <id> --to swiftui|flutter [--name <TypeName>] [-o <out>]— eject one screen to ordinary SwiftUI or Flutter source with no Stacklift dependency. Without-othe code is printed.
Publish a layout like any artifact: stacklift release create --artifact ios:ui-layout:./home.json. See Server-driven UI.
Keys, tokens and webhooks
stacklift key list/create <name> --type public|secret [--scope s]… [--expires-in-days n]/rotate <id> [--grace-hours n]/revoke <id>— project API keys. Public keys go inside your app and can only check for and report updates; secret keys are for CI. A new key is printed once.<id>is the short id fromkey list.stacklift token list/create <name> [--expires-in-days n]/revoke <id>— your personal access tokens. Create one and set it asSTACKLIFT_TOKENin CI.stacklift webhook list/create <url> [--event e]…/enable <id>/disable <id>/test <id>/deliveries <id>/delete <id>— signed HTTP callbacks (see Webhooks). The signing secret is printed once.stacklift audit [--action a] [--limit n]— who did what in the organization.
Everything here is also available in the dashboard and the API: the CLI is a convenience, not a requirement.
Store listings and status
stacklift store link <ios|android|macos|windows|linux> <url>/stacklift store unlink <platform>— the store listing link (https, on the store's own host).stacklift store status <version> <platform> <built|submitted|in-review|released|rejected|removed> [--build-number n] [--url u]— where a build is in its store journey. Stacklift has no store API access: this is what you tell it.stacklift store show— links (with derived ones flagged) and the store state of recent releases.
Channels, deploy, rollouts, status
stacklift channel list/stacklift channel create <key> [--name]stacklift deploy [version] [--channel] [--percentage] [--wait]— without a version, deploys the latest ready releasestacklift rollout pause|resume|cancel|advance [rolloutId] [--channel]stacklift rollout set <percentage> [rolloutId] [--channel]stacklift status— what each channel serves, in-flight rollouts, recent deployments
Diagnostics
stacklift doctor— Node version, config validity, adapter checks, credentials, API reachability, project access, artifact pathsstacklift upgrade— checks npm for a newer CLIstacklift version