Kisten

Automation

Drive Kisten from scripts, CI and agents with JSON output, watch, the event stream and API keys.

Everything the CLI does works without a person in front of it.

A CI job

export KISTE_TOKEN=ksta_...           # an API key, see Account → API keys
kiste new "ci-$GITHUB_RUN_ID" --ttl 1h --no-ssh --json
kiste exec "ci-$GITHUB_RUN_ID" --cwd /workspace -- make test
kiste delete "ci-$GITHUB_RUN_ID" --yes --json
  • KISTE_TOKEN signs the CLI in with an API key instead of a saved sign-in. kiste login --with-token < token.txt saves one instead.
  • --json prints one result envelope per command and never prompts, opens a browser or attaches SSH. Destructive commands then need --yes.
  • --ttl makes sure a forgotten Kiste stops by itself.
  • kiste exec exits with the command's own exit status.

Output modes and exit codes describes the envelopes and every exit code.

Wait for a state

kiste watch review-42 --until running
kiste watch review-42 --until stopped --json

watch polls one Kiste (every second by default, --interval in milliseconds) and prints an event each time its state changes. --until stops when the status, desired state or setup status reaches a value; --count after that many changes.

Follow the event stream

Your account has one durable, ordered stream of events: Kisten created, running, stopped, renamed, deleted; snapshots; commands; published ports; API keys; webhooks; alerts.

kiste events --follow
kiste events --follow --type instance.stopped
kiste events --after 4107 --output ndjson

Each event has a sequence number. Pass the last one you handled as --after and you continue exactly there, even after a restart of your script. The same stream is available from the API (GET /v1/events) and as signed webhooks.

Agents

An agent can own a Kiste completely: create it, run commands with exact output, fork it to try alternatives, and delete it. Useful details:

  • Give each agent session its own selection with KISTE_CURRENT.
  • kiste exec --id UUID makes a command addressable, so another process can cancel it with kiste cancel UUID, or kiste interrupt UUID it.
  • kiste commands and kiste command ID show the durable record of commands.
  • kiste prompt runs Codex or Claude Code inside a Kiste; see Coding agents and credentials.

On this page