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, --apiAPI endpoint URL
-e, --emailEmail address
-p, --passwordPassword
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, --orgOrganization name
-s, --spaceSpace name
drift target -o mycompany -s production
# API:   https://api.drift.velozengineering.ch
# Org:   mycompany
# Space: production

Organizations#

drift orgs(drift o)

List all organizations you have access to.

Usage: drift orgs

drift orgs
# mycompany
# another-org

drift create-org [name](drift co)

Create a new organization (admin only).

Usage: drift create-org [name]

drift create-org mycompany
# Created org mycompany

drift delete-org [id]

Delete an organization (admin only).

Usage: drift delete-org [id]

drift delete-org mycompany

drift 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     OrgAuditor

drift 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 mycompany

drift 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-29

drift revoke-invite [id]

Revoke a pending invite (admin only).

Usage: drift revoke-invite [id]

drift revoke-invite inv_abc123

Spaces#

drift spaces

List spaces in the currently targeted organization.

Usage: drift spaces

drift spaces
# dev
# staging
# production

drift create-space [name](drift cs)

Create a new space in the current org.

Usage: drift create-space [name]

drift create-space staging
# Created space staging

drift delete-space [id]

Delete a space.

Usage: drift delete-space [id]

drift delete-space staging

drift 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 SpaceDeveloper

Applications#

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          256M

drift 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-imageDocker image to deploy (required unless in manifest)
-i, --instancesNumber of instances (default: 1)
-m, --memoryMemory in MB (default: 256)
-f, --manifestPath to manifest file (default: manifest.yml)
--strategyDeployment 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.2

drift delete [name](drift d)

Delete an application.

Usage: drift delete [name]

drift delete myapp
# Deleted myapp

drift start [name](drift st)

Start a stopped application.

Usage: drift start [name]

drift start myapp

drift stop [name](drift sp)

Stop a running application.

Usage: drift stop [name]

drift stop myapp

drift 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, --instancesNumber of instances
-m, --memoryMemory in MB
drift scale myapp -i 3 -m 1024
# Scaled myapp to 3 instances

drift env [app](drift e)

Show environment variables for an app.

Usage: drift env [app]

drift env myapp
# NODE_ENV=production
# PORT=8080

drift 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 production

drift set-health [app](drift sh)

Configure health check for an app.

Usage: drift set-health [app] [--type TYPE] [--endpoint ENDPOINT]

--typeHealth check type: port, http, process (default: port)
--endpointHealth check endpoint for http type (default: /health)
drift set-health myapp --type http --endpoint /healthz

drift ssh [app]

Open an interactive shell inside a running app container.

Usage: drift ssh [app] [-c COMMAND]

-c, --commandCommand to run (default: /bin/sh)
drift ssh myapp

drift logs [app](drift lg)

Tail application logs.

Usage: drift logs [app] [-f] [-r] [-n LINES]

-f, --followStream logs continuously (default: true)
-r, --recentShow recent logs and exit
-n, --linesNumber of lines to show (default: 100)
drift logs myapp -r -n 50

Services#

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 store

drift services(drift s)

List service instances in the current space.

Usage: drift services

drift services
# NAME   SERVICE   PLAN    STATUS
# mydb   postgres  small   ready

drift service [name]

Show details for a service instance.

Usage: drift service [name]

drift service mydb
# Name:      mydb
# Service:   postgres
# Plan:      small
# Status:    ready

drift 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 mydb

drift delete-service [name](drift ds)

Delete a service instance.

Usage: drift delete-service [name]

drift delete-service mydb
# Deleted service mydb

drift 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 myapp

drift 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 myapp

drift share-service [service](drift ss)

Share a service instance with another space.

Usage: drift share-service [service] -s SPACE

-s, --spaceTarget space name
drift share-service mydb -s staging
# Shared mydb to space staging

drift unshare-service [service]

Remove service sharing from a space.

Usage: drift unshare-service [service] -s SPACE

-s, --spaceTarget space name
drift unshare-service mydb -s staging

drift 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-access

drift service-keys [service](drift sk)

List service keys for a service instance.

Usage: drift service-keys [service]

drift service-keys mydb
# external-access

drift 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-access

Backups & 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:00

drift 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]

--toTarget 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-staging

drift delete-backup [backup-id]

Delete a backup from S3 storage.

Usage: drift delete-backup [backup-id]

drift delete-backup bk_abc123

drift 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:00

drift set-backup-schedule [service]

Configure automatic backups with cron schedule and retention.

Usage: drift set-backup-schedule [service] --cron EXPR --retention N

--cronCron expression (e.g. "0 2 * * *")
--retentionNumber of backups to keep (default: 7)
drift set-backup-schedule mydb --cron "0 2 * * *" --retention 14

drift unset-backup-schedule [service]

Remove the backup schedule from a service instance.

Usage: drift unset-backup-schedule [service]

drift unset-backup-schedule mydb

Routes & Domains#

drift routes(drift r)

List routes in the current space.

Usage: drift routes

drift routes
# HOSTNAME  DOMAIN                         PATH  APPS
# myapp     drift.velozengineering.ch       /     myapp

drift domains(drift dom)

List available domains.

Usage: drift domains

drift domains
# NAME                          TYPE     INTERNAL
# drift.velozengineering.ch     shared   false
# mycompany.ch                  private  false

drift 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 mycompany

drift map-route [app] [domain](drift mr)

Map a route to an app.

Usage: drift map-route [app] [domain] [--hostname HOST] [--path PATH]

--hostnameHostname for the route
--pathPath for the route
drift map-route myapp mycompany.ch --hostname www
# Mapped route www.mycompany.ch to myapp

drift unmap-route [app] [domain](drift ur)

Remove a route mapping from an app.

Usage: drift unmap-route [app] [domain] [--hostname HOST] [--path PATH]

--hostnameHostname
--pathPath
drift unmap-route myapp mycompany.ch --hostname www

Billing#

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-01

drift 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     25

drift 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-01

API 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]

--scopesComma-separated scopes
--orgOrganization name
--expiresExpiration (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:30

drift 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-deploy

drift create-webhook [name] [url](drift cwh)

Create a webhook for event notifications.

Usage: drift create-webhook [name] [url] --events EVENTS

--eventsComma-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  true

drift webhook-deliveries [name](drift whd)

List recent deliveries for a webhook.

Usage: drift webhook-deliveries [name]

drift webhook-deliveries deploys

drift delete-webhook [name](drift dwh)

Delete a webhook.

Usage: drift delete-webhook [name]

drift delete-webhook deploys

Other 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        20

drift version

Show CLI version, commit, and build date.

Usage: drift version

drift version
# drift v1.0.0 (commit: abc1234, built: 2024-01-15)