CLI Reference
One page per noun, each with every verb, flag and output it carries. The binary's own three commands (drift, --version and upgrade) are on the CLI overview. The commands that act on a whole Driftfile (drift plan, drift apply and drift size) are on the drift file page, with the commands that work on the file itself.
The commands
- accountSign up, log in, second factor, tokens, members, delete it all.
- walletYour euro balance: read it, see its history, top it up.
- sliceCreate, resize, snapshot, link, gate, custom domains.
- fileLint it, run it locally, explain and resolve it, measure it. Plus plan, apply and size.
- atomicOne function at a time, scaffold to rollback.
- backboneReach into the data plane from your terminal.
- deedRead-only identity: status, Vault, Link, Pocket.
- migrateMove off another cloud, entirely locally.
- doctorExplain a failure code, offline, no account needed.
Session
Your login lives in ~/.drift/session.json, one profile per account you're logged in to. It holds credentials only: the slice a command acts on comes from DRIFT_SLICE or the Driftfile you are standing in, never from the session. Every authenticated request carries:
Authorization: Bearer <jwt>, your identityX-Slice: <active-slice>, the target slice
drift plan and drift apply name the slice from the Driftfile, so they act on it whichever slice is active. Tokens are refreshed automatically on a 401 that means the session expired. If the refresh fails, you're prompted to log in again. Account has the file's shape and how to work as more than one account, and Authentication has the token lifetimes.
Bare drift opens the terminal dashboard.