Saltearse al contenido

CLI Reference

Complete reference for the sureva CLI. All commands output JSON by default. Use --output table for human-readable terminal output.

FlagValuesDefaultDescription
--outputjson|tablejsonOutput format
--org <slug>stringOrganization slug; overrides SUREVA_ORG and config file
--config <path>pathAlternate config file path
--jsonOnly valid with --help; emits machine-readable command tree JSON
Terminal window
sureva version
# or
sureva --version

Returns version information as JSON:

{ "version": "0.x.y", "commit": "...", "built_at": "..." }

Terminal window
sureva auth whoami

Shows the user identity (email / user ID) for the current token.


Terminal window
sureva auth token create [--name <string>] --expires-at <RFC3339>

Creates a personal access token. The raw token value (sapi_<hex>) is shown exactly once and cannot be retrieved again.

FlagRequiredDescription
--nameNoHuman-readable label for the token; defaults to cli-token if omitted
--expires-atYesExpiry in RFC 3339 format, e.g. 2026-12-31T00:00:00Z

Terminal window
sureva auth token list

Lists all personal access tokens for the authenticated user. The raw token value is never shown in list output.


Terminal window
sureva auth token revoke <id>

Revokes the token with the given ID.



Terminal window
sureva orgs list

Lists all organizations the authenticated user belongs to.


Terminal window
sureva teams list --org <slug>

Lists all teams in the resolved organization.

FlagRequiredDescription
--orgYesOrganization slug

Terminal window
sureva apps list [--org <slug>]

Lists apps. Without --org, returns a flat cross-organization list. With --org, scopes results to that organization.

FlagRequiredDescription
--orgNoOrganization slug

Each app includes a composed url field (https://{subdomain}.sureva.com) when domain_status is active. The url field is absent until the domain is active (typically after the first successful deploy).


Terminal window
sureva apps get <app-id> --org <slug>

Returns full details for a single app.

FlagRequiredDescription
--orgYesOrganization slug

The response includes a composed url field (https://{subdomain}.sureva.com). The url field is absent (omitempty) until domain_status reaches active. Default host suffix is sureva.com; override with SUREVA_DOMAIN_SUFFIX or the domain_suffix config key.


Terminal window
sureva apps create --name <string> --type <type> --region <region> --org <slug> [options]

Creates a new application.

FlagRequiredDescription
--nameYesApplication name / slug
--typeYesweb | web-ssr | api | sse
--regionYesus-east-1 | us-east-2 | sa-east-1
--runtimeRequired when --type is not webnodejs24 | python314 | go126
--teamNoTeam slug or ID (auto-selects when org has exactly one team)
--waitNoWait for domain to become active before returning
--wait-intervalNoPolling interval (default 5s)
--wait-timeoutNoMaximum wait time (default 10m)

Terminal window
sureva apps delete <app-id> --org <slug> --yes

Initiates async teardown of an application.

FlagRequiredDescription
--orgYesOrganization slug
--yesYesConfirm deletion (required to prevent accidental deletion in scripts)

Terminal window
sureva env get <app-id> --org <slug> [--reveal]

Reads app environment variables. Values are masked (***) by default.

FlagRequiredDescription
--orgYesOrganization slug
--revealNoShow unmasked values

Terminal window
sureva env set <app-id> --org <slug> KEY=VALUE [KEY=VALUE...]

Replaces all environment variables for the app (full PUT replacement). Any key not included in the command is deleted.

FlagRequiredDescription
--orgYesOrganization slug

Terminal window
sureva deploys trigger <app-id> --org <slug> [--tag <release-tag>] [--env-id <id>] [--wait]

Triggers a new deployment.

FlagRequiredDescription
--orgYesOrganization slug
--tagRequired for API and SSE app types; optional for web appsRelease tag to deploy
--env-idNoTarget environment ID (defaults to the app’s default environment)
--waitNoWait for deployment to reach a terminal state before returning
--wait-intervalNoPolling interval (default 5s)
--wait-timeoutNoMaximum wait time (default 15m)

Terminal window
sureva deploys list <app-id> --org <slug>

Lists recent deployments for the app.

FlagRequiredDescription
--orgYesOrganization slug

Terminal window
sureva deploys status <app-id> <deploy-id> --org <slug>

Returns the status and details of a single deployment.

FlagRequiredDescription
--orgYesOrganization slug

Terminal window
sureva logs <app-id> --org <slug> [--env-id <id>]

Fetches a non-streaming log snapshot. Automatically resolves the default environment when --env-id is omitted.

FlagRequiredDescription
--orgYesOrganization slug
--env-idNoEnvironment ID (defaults to app’s default environment)

Exit codeMeaning
0Success
1General error / API error
2Auth error (401 / 403 / missing token)
3Not found (404)
4Validation / bad input (400 / 422)
5Network error

Use exit codes in scripts and agents to handle failures without parsing error text. See Agent usage for scripting patterns.