Dispatch CLI
The Dispatch CLI is the bridge between your local development environment and our global serverless infrastructure. It handles everything from project scaffolding and safety checks to zero-downtime deployments and real-time logging.
Installation
npm install -g dispatch-deployRequirements
- Node.js 16+ environment
- Supported Runtime (Node.js, Python, Java) installed locally for testing
Authentication
Before deploying, you must authenticate your machine. Dispatch supports both interactive browser-based login and token-based authentication for CI/CD pipelines.
dispatch login✅ Successfully authenticated as alex@example.com
dispatch logoutCore Commands
dispatch init
Initialize a new Dispatch project in the current directory. This creates the necessary configuration files and directory structure.
dispatch init --name my-api --runtime nodejsdispatch deploy
Packages your application, uploads it to the build cluster, and performs a zero-downtime deployment to the global edge network.
dispatch deploy🚀 Deploying project my-api... 📦 Packaging source... Done (1.2MB) 🌐 Uploading to build cluster... Done 🏗️ Building function (x86_64)... Done ✅ Deployed to https://my-api.dispatch.sh
dispatch logs
Stream real-time build and runtime logs from your deployments. Essential for debugging production issues.
dispatch logs --taildispatch check
Run static analysis and security checks on your OpenAPI specification and project configuration without deploying.
dispatch checkConfiguration
The dispatch.yaml file is the heartbeat of your project. It defines how your application is built, where it runs, and how it scales.
name: my-payment-api
runtime: python3.9
handler: main.handler
region: global
# Resource Allocation
memory: 512
timeout: 10
architecture: arm64 # 'x86_64' or 'arm64'
# Environment Variables
env:
DATABASE_URL: ${DATABASE_URL}
API_KEY: ${API_KEY}
# Security Settings
public: false
cors:
allow_origins: ["https://dashboard.example.com"]Supported Runtimes
- nodejs (16, 18, 20)
- python (3.9, 3.10, 3.11)
- go (1.x)
- java (11, 17)
Resource Limits
- Memory: 128MB - 10GB
- Timeout: 1s - 900s
- Storage: 512MB - 10GB (Ephemeral)
Project Structure
A typical Dispatch project has a flat structure centered around your configuration and source code.