Skip to content

CLI Reference

The ske CLI is a standalone Go binary. It deploys, rolls back, runs commands and reads logs, metrics, secrets and jobs. Cloud providers, projects, environments, networks, databases, caches, domains and settings are managed in the dashboard. ske help <command> shows any command’s full help.

These flags work on all commands:

Flag Description Env override
--json Output machine-readable JSON —
--api-url Override the SKE API base URL SKE_API_URL
--org Override the current organization slug SKE_ORG
--workspace Override the current workspace slug SKE_WORKSPACE
--project Override the linked project SKE_PROJECT
--env Override the linked environment SKE_ENV
--no-color Disable colored output NO_COLOR
Code Meaning
0 Success
1 General failure
2 Usage error (bad flags or arguments)
3 Authentication error
4 API error
5 Conflict

ske run exits with the remote command’s own exit code instead.


Sign in to SKE using passwordless authentication.

Terminal window
ske login [--email you@example.com]

Emails you a link to approve this sign-in and prints a code, then waits. Open the link, check it shows the same code, and press Approve; the command finishes on its own once you do. On success, stores credentials in ~/.ske/credentials.json.

Flag Description
--email Email address (prompted if omitted; required with --json)

Sign out and revoke this machine’s session.

Terminal window
ske logout

Revokes the session server-side, then deletes ~/.ske/credentials.json. Refuses if SKE_API_TOKEN is set (unset it instead).

Show the signed-in account and current organization.

Terminal window
ske whoami
you@example.com — acme-corp

List organizations you belong to. Alias: ske organizations.

Terminal window
ske orgs
SLUG NAME PERSONAL
* acme-corp Acme Corporation no
jane-doe Jane Doe yes

The current organization is marked with *.

Set the organization later commands operate on.

Terminal window
ske orgs switch <slug>
Terminal window
ske orgs switch acme-corp
Now using acme-corp

Validates the slug with the server, saves it to ~/.ske/config.json and clears the cached workspace, so the next command finds the new organization’s default workspace.


List workspaces in the current organization.

Terminal window
ske workspace list
NAME SLUG DEFAULT CREATED
Production production yes 2026-08-15T10:02:11.000000Z
Staging staging no 2026-08-20T08:41:57.000000Z

Switch to a different workspace.

Terminal window
ske workspace switch <slug>
Terminal window
ske workspace switch staging
Switched to workspace Staging (staging)

Link this directory to a project and a default environment.

Terminal window
ske link [--project <project>] [--env <environment>]

Without flags it lists the workspace’s projects and then the project’s environments, and asks for each. The choice is saved in .ske/project.json, and .ske/ is added to .gitignore. Commands run in the directory then use them without --project or --env. Without a terminal (CI, --json), both flags are required; in CI, setting SKE_PROJECT and SKE_ENV instead of linking also works.

Create ske/Dockerfile, a starter for the project’s own build steps (system packages, extensions). ske deploy joins it into the Dockerfile SKE generates. An existing ske/Dockerfile is never overwritten. See Build configuration.

Terminal window
ske dockerfile

Print the CLI version and build information.

Terminal window
ske version
ske 1.0.0 (linux/amd64)
commit abc1234
built 2026-09-20T14:30:00Z

Generate the autocompletion script for your shell (bash, zsh, fish or powershell).

Terminal window
ske completion zsh

Deploy the current directory to the linked environment (or the one --env names).

Terminal window
ske deploy [--env <environment>] [--project <project>]

For an application, the CLI builds a Docker image from the runtime’s generated Dockerfile and ske/Dockerfile, pushes it, and uploads its public assets. Docker must be installed and running. For a static site, it runs the environment’s build command with the environment’s variables set, then uploads its output directory; Docker is not needed.

Deployment 7246183051948032011 initialized.
Building image (linux/arm64)...
...
Image pushed.
Uploaded 128 assets.
Deployment 7246183051948032011 started.
[stack] Stack ready
[function] Functions updated
[alias] Traffic switched
Deployment succeeded (sequence #42) in 2m 41s
Application URL: https://abc123.execute-api.us-east-1.amazonaws.com

List recent deployments.

Terminal window
ske deploy list [--limit <n>]
Flag Description Default
--limit Number of deployments to show 15
ID TYPE STATUS INITIATOR CREATED
7246183051948032011 deploy succeeded you@example.com 2026-09-20T14:30:12.000000Z
7245860719322145803 rollback succeeded you@example.com 2026-09-19T09:15:40.000000Z
7245517348101873667 deploy succeeded ci@example.com 2026-09-18T16:00:03.000000Z

Show deployment details including the output log.

Terminal window
ske deploy show <deployment-id>

Show the latest deployment status.

Terminal window
ske status [--env <environment>]

Roll back to a previous deployment.

Terminal window
ske rollback [--to <deployment-id>] [--env <environment>]
Flag Description
--to Specific deployment ID to roll back to (defaults to the previous successful one)

Run a shell command on the linked environment (or the one --env names), wait for it to end, print its output and exit with its exit code.

Terminal window
ske run [--env <environment>] <command...>
ske run list [--limit <n>]
ske run show <run-id>

Flags of ske go before the command: everything from the command’s first word on is sent as it is. A command can’t be stopped once it has started; Ctrl-C stops waiting for it. See Artisan commands.

Terminal window
ske run php artisan migrate --force
ske run --env production bin/rails db:migrate
ske run -- list

Show an environment’s logs, newest first.

Terminal window
ske logs [env] [--since 1h] [--level error] [--search <pattern>] [--function http] [--limit 100] [--platform] [-f]

See Logs for each flag.

Show an environment’s metrics over a period, read live from the cloud provider: API Gateway requests, each function’s invocations, errors, throttles and duration, queue backlogs, and the estimated application-layer cost.

Terminal window
ske metrics [env] [--period 1d]
Flag Description Default
--period Period to report: 1m, 5m, 30m, 1h, 8h, 1d, 3d, 7d, 1M 1d

Show a database’s CPU, connections, memory, IOPS, latency, storage and ACU, read live from the cloud provider.

Terminal window
ske database metrics <name> [--period 1d]

List secrets for the current environment.

Terminal window
ske secret list [--env <environment>]
KEY LAST MODIFIED
APP_KEY 2026-09-15 14:30
STRIPE_SECRET 2026-09-15 14:32

Set a secret value.

Terminal window
ske secret set <key> [--value <value>] [--env <environment>]

If --value is omitted, prompts for the value with hidden input. Supports piped stdin:

Terminal window
printf '%s' "$SECRET" | ske secret set API_KEY

Delete a secret.

Terminal window
ske secret delete <key> [--force] [--env <environment>]
Flag Description
--force Skip confirmation prompt

Set secrets from a .env file (- reads standard input).

Terminal window
ske secret import <file> [--dry-run] [--prune] [--yes]

Prints what changes first: keys to add, change, keep or remove (with --prune), with values never shown. Then asks before applying, unless --yes is passed. A file with lines that can’t be read changes nothing.

Flag Description
--dry-run Print the changes without applying them
--prune Remove secrets the file doesn’t set
--yes Apply without asking

List recent infrastructure jobs.

Terminal window
ske job list [--limit <n>]
Flag Description Default
--limit Number of jobs to show 15
ID TYPE STATUS CREATED
7246181998310522881 database:create succeeded 2026-09-20T14:30:41.000000Z
7246181523785342977 network:create succeeded 2026-09-20T14:28:09.000000Z

Show job details including steps and output.

Terminal window
ske job show <job-id>

API URL: --api-url flag → SKE_API_URL env → api_url in config.json → https://api.ske.io

Organization: --org flag → SKE_ORG env → the linked directory’s organization → current_org in config.json

Workspace: --workspace flag → SKE_WORKSPACE env → the linked directory’s workspace → current_workspace in config.json → the organization’s default workspace

Project: --project flag → SKE_PROJECT env → the linked project

Environment: --env flag → SKE_ENV env → the linked default environment

File Location Mode Contents
config.json ~/.ske/config.json 0644 API URL, current org, current workspace
credentials.json ~/.ske/credentials.json 0600 Access token, refresh token, email, expiry
project.json .ske/project.json in the linked directory 0644 Organization, workspace, project and default environment

Access tokens are short-lived. The CLI refreshes them with the stored refresh token. File locking prevents concurrent CLI invocations from racing on the same refresh.

Variable Purpose
SKE_API_URL Override API base URL (default: https://api.ske.io)
SKE_ORG Override current organization slug
SKE_WORKSPACE Override current workspace slug
SKE_PROJECT Override the linked project
SKE_ENV Override the linked environment
SKE_API_TOKEN Static API token for CI (skips credential file)
SKE_CONFIG_DIR Override config directory (default: ~/.ske)
NO_COLOR Disable colored output