Skip to content

CLI Reference

The ske CLI is a standalone Go binary. Every platform capability is available as a CLI command.

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 project slug (from ske.yml)
--env Override the environment slug (from ske.yml)
--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

Sign in to SKE using passwordless authentication.

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

Sends a magic link to your email address, then polls until you click it. On success, stores credentials in ~/.ske/credentials.json.

Flag Description
--email Email address (prompted if omitted)

Sign out and revoke the current session.

Terminal window
ske logout

Revokes the refresh token server-side, then deletes ~/.ske/credentials.json. Refuses if SKE_API_TOKEN is set (use unset SKE_API_TOKEN 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 *.

Switch to a different organization.

Terminal window
ske orgs switch <slug>
Terminal window
ske orgs switch acme-corp
✓ Switched to acme-corp

Validates with the server and saves to ~/.ske/config.json. Clears the cached workspace.


List workspaces in the current organization.

Terminal window
ske workspace list
NAME SLUG DEFAULT CREATED
Production production yes 2026-08-15
Staging staging no 2026-08-20

Switch to a different workspace.

Terminal window
ske workspace switch <slug>
Terminal window
ske workspace switch staging
✓ Switched to staging

Create or update ske.yml for the current project.

Terminal window
ske init

Interactive mode: lists projects from the API, prompts for selection, then lists environments and prompts for selection. Creates ske.yml in the current directory.

Non-interactive mode:

Terminal window
ske init --project my-app --env production

If ske.yml already exists, prompts for confirmation before overwriting. Preserves existing configuration, comments, and unknown keys.

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

Deploy the current project.

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

Full pipeline: check Docker → init → build → push → upload assets → confirm → poll status.

⠋ Building container image...
✓ Image built (42s)
⠋ Pushing image to registry...
✓ Image pushed (18s)
⠋ Uploading assets...
✓ Assets uploaded (3s)
⠋ Provisioning infrastructure...
✓ Infrastructure ready (2m 14s)
⠋ Activating...
✓ Deployed successfully (3m 17s total)

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
42 deploy succeeded you@example.com 2026-09-20 14:30
41 rollback succeeded you@example.com 2026-09-19 09:15
40 deploy failed ci@example.com 2026-09-18 16:00

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 previous successful)

List secrets for the current environment.

Terminal window
ske secret list [--env <environment>]
KEY LAST MODIFIED
APP_KEY 2026-09-15 14:30
DB_PASSWORD 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

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
15 database:create succeeded 2026-09-20 14:30
14 network:create succeeded 2026-09-20 14:28

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 → current_org in config.json

Workspace: --workspace flag → SKE_WORKSPACE env → current_workspace in config.json → API default

Project: --project flag → name in ske.yml

Environment: --env flag → sole environment in ske.yml (if exactly one defined)

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
ske.yml Project root 0644 Project name, environment configuration

Access tokens expire after 15 minutes. The CLI transparently refreshes using 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_API_TOKEN Static API token for CI (skips credential file)
SKE_CONFIG_DIR Override config directory (default: ~/.ske)
NO_COLOR Disable colored output