CLI Reference
Complete reference for all drift commands.
Authentication#
drift login(drift l)
Login to the Drift API and store credentials locally.
Usage: drift login [-a API_URL] [-e EMAIL] [-p PASSWORD]
| -a, --api | API endpoint URL |
| -e, --email | Email address |
| -p, --password | Password |
drift login -a https://api.drift.velozengineering.ch -e [email protected] -p mypass
# Logged in as [email protected]drift target(drift t)
Set or view the current organization and space target.
Usage: drift target [-o ORG] [-s SPACE]
| -o, --org | Organization name |
| -s, --space | Space name |
drift target -o mycompany -s production
# API: https://api.drift.velozengineering.ch
# Org: mycompany
# Space: productionOrganizations#
drift orgs(drift o)
List all organizations you have access to.
Usage: drift orgs
drift orgs
# mycompany
# another-orgdrift create-org [name](drift co)
Create a new organization (admin only).
Usage: drift create-org [name]
drift create-org mycompany
# Created org mycompanydrift delete-org [id]
Delete an organization (admin only).
Usage: drift delete-org [id]
drift delete-org mycompanydrift org-users [org]
List users and their roles in an organization.
Usage: drift org-users [org]
drift org-users mycompany
# EMAIL NAME ROLES
# [email protected] Admin OrgManager, BillingManager
# [email protected] Dev OrgAuditordrift set-org-role [email] [org] [role]
Assign an organization role to a user. Roles: OrgManager, OrgAuditor, BillingManager.
Usage: drift set-org-role [email] [org] [role]
drift set-org-role [email protected] mycompany OrgManager
# Set role OrgManager for [email protected] in org mycompanydrift invite [email]
Invite a user to an organization (admin only). The user receives a link to accept.
Usage: drift invite [email] --org [name] --role [role]
drift invite [email protected] --org firma-ag --role OrgManager
# Invite sent to [email protected] (expires in 7 days)drift invites
List pending invites for an organization (admin only).
Usage: drift invites --org [name]
drift invites --org firma-ag
# EMAIL ROLE STATUS EXPIRES
# [email protected] OrgManager pending 2026-03-29drift revoke-invite [id]
Revoke a pending invite (admin only).
Usage: drift revoke-invite [id]
drift revoke-invite inv_abc123Spaces#
drift spaces
List spaces in the currently targeted organization.
Usage: drift spaces
drift spaces
# dev
# staging
# productiondrift create-space [name](drift cs)
Create a new space in the current org.
Usage: drift create-space [name]
drift create-space staging
# Created space stagingdrift delete-space [id]
Delete a space.
Usage: drift delete-space [id]
drift delete-space stagingdrift set-space-role [email] [org] [space] [role]
Assign a space role to a user. Roles: SpaceManager, SpaceDeveloper, SpaceAuditor.
Usage: drift set-space-role [email] [org] [space] [role]
drift set-space-role [email protected] mycompany staging SpaceDeveloperApplications#
drift apps(drift a)
List all apps in the current space.
Usage: drift apps
drift apps
# NAME STATE INSTANCES MEMORY
# web STARTED 2 512M
# worker STARTED 1 256Mdrift push [name](drift p)
Deploy an application. Creates the app if it doesn't exist, or updates it.
Usage: drift push [name] [--docker-image IMAGE] [-i INSTANCES] [-m MEMORY] [-f MANIFEST]
| --docker-image | Docker image to deploy (required unless in manifest) |
| -i, --instances | Number of instances (default: 1) |
| -m, --memory | Memory in MB (default: 256) |
| -f, --manifest | Path to manifest file (default: manifest.yml) |
| --strategy | Deployment strategy: rolling (default), canary |
drift push myapp --docker-image registry.example.com/myapp:v1.2 -i 2 -m 512
# Pushed myapp (state: STARTED)drift app [name]
Show detailed info about an app, including routes and instance stats.
Usage: drift app [name]
drift app myapp
# Name: myapp
# State: STARTED
# Instances: 2
# Memory: 512M
# Image: registry.example.com/myapp:v1.2drift delete [name](drift d)
Delete an application.
Usage: drift delete [name]
drift delete myapp
# Deleted myappdrift start [name](drift st)
Start a stopped application.
Usage: drift start [name]
drift start myappdrift stop [name](drift sp)
Stop a running application.
Usage: drift stop [name]
drift stop myappdrift restart [name](drift rs)
Rolling restart an application (zero-downtime).
Usage: drift restart [name]
drift restart myapp
# Restarting myapp (rolling restart)drift deployment [name](drift dep)
Show the current deployment status of an app, including strategy, progress, and instance health.
Usage: drift deployment [name]
drift deployment myapp
# App: myapp
# Strategy: canary
# Status: in-progress
# Current: myregistry/myapp:v1 (2 instances)
# Target: myregistry/myapp:v2 (canary: 1/3 healthy)drift rollback [name](drift rb)
Rollback an app to its previous version. Reverts the Docker image and restarts instances.
Usage: drift rollback [name]
drift rollback myapp
# Rolled back myapp to previous version (myregistry/myapp:v1)drift scale [name](drift sc)
Scale an app's instances or memory.
Usage: drift scale [name] [-i INSTANCES] [-m MEMORY]
| -i, --instances | Number of instances |
| -m, --memory | Memory in MB |
drift scale myapp -i 3 -m 1024
# Scaled myapp to 3 instancesdrift env [app](drift e)
Show environment variables for an app.
Usage: drift env [app]
drift env myapp
# NODE_ENV=production
# PORT=8080drift set-env [app] [key] [value](drift se)
Set an environment variable on an app.
Usage: drift set-env [app] [key] [value]
drift set-env myapp NODE_ENV productiondrift set-health [app](drift sh)
Configure health check for an app.
Usage: drift set-health [app] [--type TYPE] [--endpoint ENDPOINT]
| --type | Health check type: port, http, process (default: port) |
| --endpoint | Health check endpoint for http type (default: /health) |
drift set-health myapp --type http --endpoint /healthzdrift ssh [app]
Open an interactive shell inside a running app container.
Usage: drift ssh [app] [-c COMMAND]
| -c, --command | Command to run (default: /bin/sh) |
drift ssh myappdrift logs [app](drift lg)
Tail application logs.
Usage: drift logs [app] [-f] [-r] [-n LINES]
| -f, --follow | Stream logs continuously (default: true) |
| -r, --recent | Show recent logs and exit |
| -n, --lines | Number of lines to show (default: 100) |
drift logs myapp -r -n 50Services#
drift marketplace(drift m)
List all available services and their plans.
Usage: drift marketplace
drift marketplace
# SERVICE PLANS DESCRIPTION
# postgres small, medium, ... PostgreSQL 16 database
# redis small, medium, ... Redis 7 in-memory storedrift services(drift s)
List service instances in the current space.
Usage: drift services
drift services
# NAME SERVICE PLAN STATUS
# mydb postgres small readydrift service [name]
Show details for a service instance.
Usage: drift service [name]
drift service mydb
# Name: mydb
# Service: postgres
# Plan: small
# Status: readydrift create-service [service] [plan] [name](drift crs)
Create a new service instance.
Usage: drift create-service [service] [plan] [name]
drift create-service postgres small mydb
# Created service instance mydbdrift delete-service [name](drift ds)
Delete a service instance.
Usage: drift delete-service [name]
drift delete-service mydb
# Deleted service mydbdrift bind-service [app] [service](drift bs)
Bind a service instance to an app. Credentials appear in VCAP_SERVICES.
Usage: drift bind-service [app] [service]
drift bind-service myapp mydb
# Bound mydb to myappdrift unbind-service [app] [service](drift us)
Unbind a service from an app.
Usage: drift unbind-service [app] [service]
drift unbind-service myapp mydb
# Unbound mydb from myappdrift share-service [service](drift ss)
Share a service instance with another space.
Usage: drift share-service [service] -s SPACE
| -s, --space | Target space name |
drift share-service mydb -s staging
# Shared mydb to space stagingdrift unshare-service [service]
Remove service sharing from a space.
Usage: drift unshare-service [service] -s SPACE
| -s, --space | Target space name |
drift unshare-service mydb -s stagingdrift create-service-key [service] [key-name](drift csk)
Create a service key for direct access to credentials.
Usage: drift create-service-key [service] [key-name]
drift create-service-key mydb external-access
# Created service key external-accessdrift service-keys [service](drift sk)
List service keys for a service instance.
Usage: drift service-keys [service]
drift service-keys mydb
# external-accessdrift service-key [service] [key-name]
Show credentials for a service key.
Usage: drift service-key [service] [key-name]
drift service-key mydb external-access
# {
# "host": "drift-pg-abc12345",
# "port": 5432,
# "database": "db_1a2b3c4d",
# "username": "u_5e6f7g8h",
# "password": "...",
# "uri": "postgres://..."
# }drift delete-service-key [service] [key-name](drift dsk)
Delete a service key.
Usage: drift delete-service-key [service] [key-name]
drift delete-service-key mydb external-accessBackups & Restore#
drift backups [service](drift bk)
List backups for a service instance.
Usage: drift backups [service]
drift backups mydb
# ID STATUS SIZE TYPE CREATED
# bk_abc123 completed 24MB manual 2026-03-22 02:00
# bk_def456 completed 23MB scheduled 2026-03-21 02:00drift create-backup [service](drift cb)
Create a manual backup of a service instance. Supports: Postgres, MySQL, MongoDB, Redis.
Usage: drift create-backup [service]
drift create-backup mydb
# Backup bk_abc123 started (running in background)drift restore-backup [backup-id](drift rb)
Restore a backup. Optionally restore to a different service instance.
Usage: drift restore-backup [backup-id] [--to TARGET]
| --to | Target service instance (cross-restore) |
drift restore-backup bk_abc123
# Restore started for bk_abc123
drift restore-backup bk_abc123 --to mydb-staging
# Restore started for bk_abc123 → mydb-stagingdrift delete-backup [backup-id]
Delete a backup from S3 storage.
Usage: drift delete-backup [backup-id]
drift delete-backup bk_abc123drift backup-schedule [service]
Show the backup schedule for a service instance.
Usage: drift backup-schedule [service]
drift backup-schedule mydb
# Schedule: 0 2 * * * (daily at 02:00)
# Retention: 7 backups
# Enabled: true
# Last run: 2026-03-22 02:00
# Next run: 2026-03-23 02:00drift set-backup-schedule [service]
Configure automatic backups with cron schedule and retention.
Usage: drift set-backup-schedule [service] --cron EXPR --retention N
| --cron | Cron expression (e.g. "0 2 * * *") |
| --retention | Number of backups to keep (default: 7) |
drift set-backup-schedule mydb --cron "0 2 * * *" --retention 14drift unset-backup-schedule [service]
Remove the backup schedule from a service instance.
Usage: drift unset-backup-schedule [service]
drift unset-backup-schedule mydbRoutes & Domains#
drift routes(drift r)
List routes in the current space.
Usage: drift routes
drift routes
# HOSTNAME DOMAIN PATH APPS
# myapp drift.velozengineering.ch / myappdrift domains(drift dom)
List available domains.
Usage: drift domains
drift domains
# NAME TYPE INTERNAL
# drift.velozengineering.ch shared false
# mycompany.ch private falsedrift create-domain [org] [domain](drift cd)
Add a custom private domain to an organization.
Usage: drift create-domain [org] [domain]
drift create-domain mycompany mycompany.ch
# Created domain mycompany.ch for org mycompanydrift map-route [app] [domain](drift mr)
Map a route to an app.
Usage: drift map-route [app] [domain] [--hostname HOST] [--path PATH]
| --hostname | Hostname for the route |
| --path | Path for the route |
drift map-route myapp mycompany.ch --hostname www
# Mapped route www.mycompany.ch to myappdrift unmap-route [app] [domain](drift ur)
Remove a route mapping from an app.
Usage: drift unmap-route [app] [domain] [--hostname HOST] [--path PATH]
| --hostname | Hostname |
| --path | Path |
drift unmap-route myapp mycompany.ch --hostname wwwBilling#
drift plans
List available billing plans with pricing.
Usage: drift plans
drift plans
# NAME PRICE (CHF) APPS SERVICES MEMORY USERS
# Free CHF 0/mo 3 2 512M 3
# Developer CHF 29/mo 10 10 4096M 5
# Team CHF 99/mo 50 50 16384M 25
# Business CHF 299/mo ∞ ∞ 65536M ∞drift subscription
Show the current subscription for the targeted org.
Usage: drift subscription
drift subscription
# Plan: team
# Status: active
# Period: 2024-01-01 → 2024-02-01drift upgrade [plan]
Upgrade (or change) the org's subscription plan.
Usage: drift upgrade [plan]
drift upgrade business
# Subscription updated to business (status: active)drift usage
Show current resource usage vs plan limits.
Usage: drift usage
drift usage
# RESOURCE USED LIMIT
# Apps 5 50
# Services 8 50
# Memory 4096M 16384M
# Users 3 25drift invoices
List invoices for the current org.
Usage: drift invoices
drift invoices
# ID AMOUNT STATUS PERIOD
# a1b2c3d4 CHF 99.00 paid 2024-01-01 → 2024-02-01API Keys & Webhooks#
drift create-api-key [name](drift cak)
Create an API key for programmatic access.
Usage: drift create-api-key [name] [--scopes SCOPES] [--org ORG] [--expires EXPIRES]
| --scopes | Comma-separated scopes |
| --org | Organization name |
| --expires | Expiration (e.g. 90d) |
drift create-api-key ci-deploy --scopes apps:write --expires 90d
# API key created: ci-deploy
# Key: dk_a1b2c3d4...
# ⚠️ Save this key — it won't be shown again!drift api-keys(drift ak)
List API keys.
Usage: drift api-keys
drift api-keys
# NAME PREFIX SCOPES EXPIRES LAST USED
# ci-deploy dk_a1b2 apps:write 2024-04-15 2024-01-20 14:30drift delete-api-key [name-or-id](drift dak)
Revoke an API key.
Usage: drift delete-api-key [name-or-id]
drift delete-api-key ci-deploydrift create-webhook [name] [url](drift cwh)
Create a webhook for event notifications.
Usage: drift create-webhook [name] [url] --events EVENTS
| --events | Comma-separated events (e.g. app.push,app.crash) |
drift create-webhook deploys https://hooks.example.com/drift --events app.push,app.crash
# Webhook created: deploys
# Secret: whsec_...
# ⚠️ Save this secret — it won't be shown again!drift webhooks(drift wh)
List webhooks for the current org.
Usage: drift webhooks
drift webhooks
# NAME URL EVENTS ACTIVE
# deploys https://hooks.example.com/drift app.push,app.crash truedrift webhook-deliveries [name](drift whd)
List recent deliveries for a webhook.
Usage: drift webhook-deliveries [name]
drift webhook-deliveries deploysdrift delete-webhook [name](drift dwh)
Delete a webhook.
Usage: drift delete-webhook [name]
drift delete-webhook deploysOther Commands#
drift events(drift ev)
Show recent events in the current space.
Usage: drift events
drift events
# TIME TYPE TARGET ACTOR
# 2024-01-20 14:30:00 app.push app myapp [email protected]drift quotas
List available quotas.
Usage: drift quotas
drift quotas
# NAME MEMORY APPS SERVICES ROUTES
# default 4096M 10 10 20drift version
Show CLI version, commit, and build date.
Usage: drift version
drift version
# drift v1.0.0 (commit: abc1234, built: 2024-01-15)