CLI reference
Orbit commands act on a remote host and a named slot.
orbit setup <host> [--email you@example.com]orbit create [<host> <slot>] [--ttl 6h]orbit create <host> {}.example.com [--ttl 6h]orbit deploy [<host> <slot>] [--dry-run]orbit status [<host> [<slot>]]orbit env [<host> <slot>] [--set KEY=VALUE | --from FILE | --edit]orbit remove [<host> <slot>] [--purge] [--yes]Target arguments
For create, deploy, env, and remove, provide both host and slot, or provide neither.
When both values are omitted, Orbit reads the target saved for the current Git remote and branch. A detached HEAD has no branch mapping, so pass the target explicitly.
status also accepts only a host:
orbit status shipThis lists all slots on that host.
Host values
Orbit passes the host value to OpenSSH. Accepted forms include:
ship Host alias in ~/.ssh/configdeploy@host.example.com user and hostnamedeploy@203.0.113.10 user and addresshost.example.com hostname with the default SSH userThe value must not start with - or contain /.
setup
orbit setup ship --email you@example.comPrepares the Ubuntu host, slot tree, permissions, Caddy service, and optional expiry support. If --email is omitted, Orbit prompts for the ACME email.
Setup uses an interactive SSH session because sudo can prompt. Normal Orbit commands use SSH batch mode.
Setup changes the system Caddy service. Read Prepare the host before you run it.
create
orbit create ship app.example.comCreates an empty slot. A successful create saves the target for the current Git remote and branch.
Use one {} placeholder for a generated preview name:
orbit create ship {}.example.com# created ship calm-otter.example.comGenerated names do not reuse a slot tree that still contains retained data, environment values, or runtime files. An explicit slot name can reuse retained data and env after a normal removal.
Add an expiry:
orbit create ship {}.example.com --ttl 6hDurations use minutes, hours, or days, such as 30m, 6h, or 2d. The maximum is 30d. Expiry permanently purges the slot.
deploy
orbit deploy ship app.example.comSelects the current Git work tree, mirrors it into the slot source, and runs ops/deploy.sh. The script must exist and be executable.
Orbit reports the local HEAD revision, streams hook output, and returns the hook exit status. A dirty work tree is allowed and is included in the upload.
Preview target resolution without changing the remote host:
orbit deploy ship app.example.com --dry-runAfter Orbit has saved a target for the current remote and branch, use:
orbit deploystatus
Show one slot:
orbit status ship app.example.comShow the saved slot for the current Git remote and branch:
orbit statusShow all slots on a host:
orbit status shipOrbit runs ops/status.sh when it exists. A missing hook reports unknown.
env
Replace the complete slot environment from a local file:
orbit env ship app.example.com --from .env.productionSet one or more values while keeping the other values:
orbit env ship app.example.com \ --set APP_ENV=production \ --set LOG_LEVEL=infoEdit the environment with the configured terminal editor:
orbit env ship app.example.com --editWithout an action, Orbit prints sorted keys and redacts the values:
APP_ENV=<redacted>DATABASE_URL=<redacted>The environment is stored at $SLOT_ENV with mode 0600. Orbit transfers the complete file to the local process when it reads or edits values. Anyone who can connect as the deploy user can read it.
remove
Stop and remove a slot:
orbit remove ship app.example.comOrbit runs ops/down.sh when present, then removes synchronized source and runtime files. It keeps durable data and environment values so an explicit create of the same slot can reuse them.
Permanently delete the complete slot:
orbit remove ship app.example.com --purgeUse --yes to skip the confirmation prompt.
Manual removal cancels an active expiry timer. An expiry is always a purge.
User config
Orbit stores local target mappings at:
~/.config/orbit/config.jsonIf $XDG_CONFIG_HOME is set, Orbit uses $XDG_CONFIG_HOME/orbit/config.json.
Mappings use a normalized origin remote URL and branch:
{ "version": 1, "remotes": { "github.com/acme/app": { "branches": { "main": { "host": "ship", "slot": "app.example.com" } } } }}Successful create and deploy commands create or update the mapping.