OpenWorkers CLI
Command-line interface for managing OpenWorkers deployments.
Installation
Prebuilt binaries (recommended):
# Using cargo-binstall (auto-detects prebuilt binaries)
# Or download manually from GitHub Releases
|
# macOS (Intel)
|
# macOS (Apple Silicon)
|
Docker:
Build from source:
Quick Start
# Login (opens browser)
# Create and deploy a worker
# Your worker is live at https://my-api.workers.rocks
Commands
| Command | Short | Description |
|---|---|---|
workers |
w |
Create, deploy, manage workers |
env |
e |
Environment variables/secrets |
storage |
s |
S3/R2 storage configurations |
kv |
k |
Key-value namespaces |
databases |
d |
SQL database bindings |
users |
u |
User management (DB only) |
alias |
Backend connection aliases | |
login |
Authenticate with API | |
migrate |
Database schema migrations |
Common operations: list (ls), get, create, delete (rm)
Workers
Workers are serverless functions deployed to the edge.
# Deploy a single file
# Deploy a folder with worker.js + static assets (SvelteKit, etc.)
Supported file types: .js, .ts, .wasm
Environments
Environments group configuration for your workers: variables, secrets, and bindings to resources.
# Variables (plain text, visible in logs)
# Secrets (encrypted, masked in output)
# Bindings connect resources to your worker code (accessible via env.CACHE, env.DB, etc.)
# Link environment to a worker
Storage
S3-compatible object storage for files, images, and static assets.
# Platform-managed storage
# Bring your own S3/R2 bucket
KV
Fast key-value store for caching, sessions, and feature flags.
Databases
SQL databases for persistent data. Query with env.DB.execute() in your worker.
# Platform-managed database
# Bring your own Postgres
Aliases
Aliases let you manage multiple backends (production, staging, local) from the same CLI.
# API backend (hosted platform)
# API backend (self-hosted, skip TLS verification)
# DB backend (direct PostgreSQL access for migrations)
Prefix any command with an alias name:
Config stored in ~/.openworkers/config.json.
Migrations
Database schema migrations for self-hosted deployments. Requires a DB alias.
Config File
Development