Command Line
The vski command-line tool manages VSKI deployments: databases, collections,
records, migrations, pipelines, cron, webhooks, secrets, plugins, plus the
declarative IaC workflow (plan / apply / pull).
It ships with the Python SDK:
pip install vski-sdk[cli] --extra-index-url https://vski.sh/api/packages/x/pypi/simple/The command line tool is the successor to the minimal Deno CLI that shipped
with @vski/sdk (login / db / migrate); that one is deprecated.
Configuration
Section titled “Configuration”Every command resolves its target deployment and credentials the same way (highest precedence first):
- CLI flags:
--url,--api-key,--token,--db - Environment variables:
VSKI_URL,VSKI_API_KEY,VSKI_TOKEN,VSKI_DB - A
.envfile in the working directory (or--env-file path); values there never override real environment variables - The login config file
~/.vski/config.json(written byvski login; override its location withVSKI_CONFIG)
export VSKI_URL=https://vski.example.comexport VSKI_API_KEY=vski_... # mint with `vski keys create` (below)
vski status # health + effective configTwo credential kinds:
- API keys (recommended for CI and day-to-day devops). Minted once by an
admin:
vski keys create ci --roles admin(roles are comma-separated; anadmin-role key can do everything, aworkflows-role key only pipelines/secrets). The raw key is shown exactly once. - Admin JWT via
vski login(prompts for email/password, stores the token in~/.vski/config.json);vski logoutclears it.
Global flags: --json (machine-readable output for every command),
--yes/-y (skip confirmations), --db/-d (default database),
--env-file.
Local lifecycle
Section titled “Local lifecycle”The quickest path from zero to a running local server is the command line tool itself (see Getting Started):
vski install # docker pull vski.sh/x/vski:latest-standalonevski serve [port] [data-dir] # docker run; defaults: 3000, ~/.vski/datavski doctor # check env: server, auth, docker, local imagevski init [dir] # bootstrap a project from the app templatevski setup [dir] # scaffold a minimal declarative project (./vski)vski install [--light] [--tag v0.15.1]pulls the server image. The default is the standalone image (with the embedded web UI);--lightgets the API-only one,--taga specific release.vski serve 3000runs it in the foreground (Ctrl-C stops the container);--detach/-druns it in the background with a restart policy and prints the URL. AJWT_SECRETis generated once into~/.vski/serve.envand reused, so tokens survive restarts.--name,--imageand repeatable--env KEY=VALcover the rest of the commondocker runoptions.vski doctorprints a checklist (server reachability, credentials, docker, local image, SDK version) and exits non-zero when something essential is broken;--jsonemits it structured.vski initclones the app template (a declarative deployment, a demo plugin, a docker-compose stack, an e2e suite; see Project Boilerplate) intodirwithout its.git.--refpicks a tag,--froma different URL or a local path.vski setupwrites a startervski/directory only (a workingnotescollection plus commented pipeline / cron / secrets examples) that loads through the strict IaC validator, ready forvski planandvski apply.
Commands
Section titled “Commands”vski login | logout | whoami | status
vski db list | create <name> | rm <name>vski collections list | show <name> | rm <name> # --db scopesvski records list | get | create | update | rm | search # dev conveniencevski sql exec "<sql>" | sql query <name>vski migrations list | status | generate | apply <ver> | rollback <ver> | upload <file> | export | rm <ver>vski pipelines list | show | validate <file> | run <name> | rmvski pipelines tokens list | create | rm # public trigger tokensvski pipelines trigger <ptk_...>vski runs list | show | events | cancel # workflow + pipeline runsvski cron list | rmvski webhooks list | rm | trigger | logsvski graphs list | show | stats | rmvski secrets list | set <name> <value|-> | rmvski plugins list | scanvski plugins instances list | show | start | stop | restart | invoke | logs | rmvski keys create <name> --roles adminvski replicas list
vski init | install | serve | doctor | setup # local lifecycle (above)vski plan [dir] | vski apply [dir] | vski pull [dir] # IaC; see the IaC pageNotes:
- Collection creation is deliberately not an imperative command: schema changes go through migrations or the IaC apply flow so every change is reviewable and rollback-able.
vski planexits2when the deployment drifts from the desired state (0 = clean, 1 = error), a drop-in CI gate, liketerraform plan -detailed-exitcode.- The app template wires the IaC commands into
its Makefile (
make iac-plan/iac-apply/iac-pull).