Deploy and manage an app with the Sureva CLI
Go from an existing team to a running web app with a public URL using sureva CLI v0.1.0. Every step is verified against the CLI source and safe to run verbatim in AI agents and CI pipelines.
Quick path
Section titled “Quick path”- Verify your team —
sureva teams list --org <slug> - Create the app —
sureva apps create --name my-app --type web --region us-east-1 --org <slug> - Set environment variables (optional) —
sureva env set <app-id> --org <slug> KEY=value - Trigger and watch the first deploy —
sureva deploys trigger <app-id> --org <slug> --wait - Get the public URL —
sureva apps get <app-id> --org <slug> | jq -r '.url' - Check status and logs as needed
Before you start
Section titled “Before you start”- GitHub App installed — installation is web-only at cloud.sureva.com. There is no CLI path.
- Team exists — your org must have at least one team. Teams are created in the web UI only; the CLI can only list them.
- PAT exported — export your personal access token:
See Authentication for how to create a PAT.
Terminal window export SUREVA_TOKEN=sapi_<your-token>export SUREVA_ORG=<your-org-slug> # optional; avoids repeating --org
1. Verify your team
Section titled “1. Verify your team”sureva teams list --org <slug>Extract team slugs with jq:
sureva teams list --org <slug> | jq -r '.[].slug'If the org has no teams, create one at cloud.sureva.com before continuing. Exit code 4 means a precondition was not met.
2. Create the web app
Section titled “2. Create the web app”sureva apps create \ --name my-app \ --type web \ --region us-east-1 \ --org <slug>Capture the app ID immediately:
APP_ID=$(sureva apps create \ --name my-app \ --type web \ --region us-east-1 \ --org <slug> | jq -r '.id')A successful response looks like this (trimmed for recognition):
{ "id": "app_01abc...", "name": "my-app", "type": "web", "subdomain": "my-app-a1b2", "domain_status": "pending", "url": null}domain_status is pending and url is absent at creation time. The URL becomes available after the first successful deploy activates the DNS/CDN infrastructure.
3. Configure environment variables (optional)
Section titled “3. Configure environment variables (optional)”sureva env set $APP_ID --org <slug> \ DATABASE_URL=postgres://... \ REDIS_URL=redis://...env set performs a full PUT replacement — any key not included in the command is deleted. Verify after setting:
sureva env get $APP_ID --org <slug> | jq 'keys'4. Trigger and watch the first deploy
Section titled “4. Trigger and watch the first deploy”sureva deploys trigger $APP_ID --org <slug> --wait--wait blocks until the deployment reaches a terminal state (timeout 15m). Exit codes:
| Exit code | Error code | Meaning |
|---|---|---|
0 | — | Deploy succeeded |
1 | deploy_failed | Deploy reached a failed or cancelled terminal state |
1 | wait_timeout | Deploy did not complete within 15m |
For web apps, --tag is not required. The deploy uses the configured GitHub branch, build command, and output directory.
5. Get the public URL
Section titled “5. Get the public URL”After step 4 exits 0, the domain is active:
sureva apps get $APP_ID --org <slug> | jq -r '.url'# https://my-app-a1b2.sureva.comThe default host suffix is sureva.com. The url field is null / absent until domain_status is active.
6. Check status and read logs
Section titled “6. Check status and read logs”# List recent deploymentssureva deploys list $APP_ID --org <slug>
# Get the status of a specific deploymentsureva deploys status $APP_ID <deploy-id> --org <slug>
# Fetch a log snapshotsureva logs $APP_ID --org <slug>Get the ID and status of the latest deploy in one command:
sureva deploys list $APP_ID --org <slug> | jq -r '.[0] | "\(.id) \(.status)"'Delete an app
Section titled “Delete an app”sureva apps delete $APP_ID --org <slug> --yesOn success, the API returns {"status": "deleting"} and the teardown runs asynchronously. Exit codes:
| Exit code | Error code | Meaning |
|---|---|---|
0 | — | Teardown dispatched |
1 | teardown_dispatch_failed | API accepted the request but infrastructure teardown failed to start |
4 | validation_error | --yes not passed |
Use sureva apps get $APP_ID --org <slug> to poll teardown status.
App types beyond web
Section titled “App types beyond web”For api, sse, and web-ssr apps, two extra requirements apply:
--runtimeat create — required:nodejs24,python314, orgo126.--tagat deploy — deploy a release tag you create externally:Terminal window gh release create v1.0.0 --repo my-org/my-appsureva deploys trigger $APP_ID --org <slug> --tag v1.0.0 --wait
Example for an API app:
APP_ID=$(sureva apps create \ --name my-api \ --type api \ --runtime nodejs24 \ --region us-east-1 \ --org <slug> | jq -r '.id')
gh release create v1.0.0 --repo my-org/my-apisureva deploys trigger $APP_ID --org <slug> --tag v1.0.0 --waitExit codes and error handling
Section titled “Exit codes and error handling”Key exit codes for this guide’s journey:
| Exit code | Error code | Trigger |
|---|---|---|
0 | — | Success |
1 | wait_timeout | apps create --wait or deploys trigger --wait timed out |
1 | domain_failed | apps create --wait — domain provisioning failed |
1 | deploy_failed | deploys trigger --wait — deployment failed or was cancelled |
1 | teardown_dispatch_failed | apps delete — infrastructure teardown failed to start |
4 | validation_error | Missing --yes, --runtime, --team, or other precondition |
See Agent usage for scripting patterns and the full exit code reference.
Related guides
Section titled “Related guides”- Deploy a GitHub web landing — first-deploy DNS/CDN lifecycle for web apps.
- CLI Reference — complete flag and exit code reference.
- Authentication — create and manage personal access tokens.