CLI
Manage your Saka servers and sites from the terminal: deploys, rollbacks, variables, backups, and every API endpoint. Made for developers and for automated deploys from CI.
Install
curl -fsSL https://saka.work/cli.sh | shirm https://saka.work/cli.ps1 | iexThe script downloads the binary from app.saka.work and checks its SHA-256 before installing. You can also download binaries directly: https://app.saka.work/unduh/saka-<os>-<arch> (linux, darwin, windows; amd64, arm64) plus SHA256SUMS-cli.
Sign in
Create a token in the panel (Settings, API tokens, see Create a token), then:
saka login
saka whoamiThe token is stored in ~/.config/saka/config.json (readable only by you). saka logout removes it. Anyone holding the token can manage your servers, so keep it safe and revoke it in the panel if it leaks.
Commands
| Command | What it does |
|---|---|
saka server | List servers and their status |
saka server <name> | Server details: CPU, RAM, disk, apps |
saka site | List sites and apps |
saka site <name> | Site details: domains, HTTPS, Git releases |
saka site deploy <name> | Deploy the latest commit of a Git app and wait for the result |
saka site rollback <name> <release> | Go back to an earlier release (tag from saka site <name>) |
saka site env <name> KEY=value | Set variables; KEY= removes one |
saka site backup <name> | Make a backup now |
saka site backups <name> | List backups |
saka site download <name> [file] [-o file] | Download a backup (default: the latest) |
saka site cron <name> <job> | Run a cron job now |
saka site log <name> [kind] [-f] | App, build, error, or web server logs; -f follows, --lines N |
saka task <id> | Follow a task until it finishes |
saka api <METHOD> <path> [json] | Call any REST API endpoint, e.g. saka api GET server |
Sites can be named by name, ID, or one of their domains. Every command also has an Indonesian name (situs, masuk, cadangkan, unduh, tugas). Messages follow your system language; force one with SAKA_LANG=en or id. Options: --json for JSON output, --no-wait to not wait for tasks. Failed commands exit with code 1.
Deploy from CI
In CI there is no need for saka login: set a SAKA_TOKEN secret. A GitHub Actions example that deploys every push to main and fails if the deploy fails:
name: deploy
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: curl -fsSL https://saka.work/cli.sh | SAKA_DIR=$HOME/.local/bin sh
- run: ~/.local/bin/saka site deploy shop-api
env:
SAKA_TOKEN: ${{ secrets.SAKA_TOKEN }}Pushes can also deploy directly through a webhook without CI; the CLI helps when a deploy should wait for tests to pass first.
A terminal on the server
This CLI manages Saka from your computer. To open a terminal on the server itself without SSH, use Terminal on the server page in the panel (see Security).