CLI Reference
The edgezero CLI provides commands for scaffolding, development, building, and deployment.
Installation
Follow the Getting Started guide to install the CLI.
Commands
edgezero new
Scaffold a new EdgeZero project:
edgezero new <name> [options]Arguments:
<name>- Project name (used for directory and crate names)
Options:
--dir <path>- Directory to create the project in (default: current directory)--local-core- Use local path dependency for edgezero-core (development only)
Examples:
# Create project with all registered adapters
edgezero new my-app
# Create in a specific directory
edgezero new my-app --dir /path/to/projectsGenerated structure:
my-app/
├── Cargo.toml
├── edgezero.toml
├── crates/
│ ├── my-app-core/
│ ├── my-app-adapter-fastly/
│ ├── my-app-adapter-cloudflare/
│ └── my-app-adapter-axum/The scaffolder includes all adapters registered at CLI build time.
edgezero dev
Start the local development server:
edgezero devExample:
edgezero dev
# Server starts at http://127.0.0.1:8787If edgezero.toml defines an Axum adapter command, edgezero dev delegates to it. Otherwise it starts the built-in dev server (default routes).
edgezero build
Build for a specific adapter:
edgezero build --adapter <name>Arguments:
--adapter <name>- Target adapter (fastly,cloudflare,axum)
Examples:
# Build for Fastly
edgezero build --adapter fastly
# Build for Cloudflare
edgezero build --adapter cloudflare
# Build native binary
edgezero build --adapter axumThe command executes the build command from [adapters.<name>.commands] in edgezero.toml, or falls back to the built-in adapter helper.
Any arguments after -- are forwarded to the adapter command:
edgezero build --adapter fastly -- --flag valueedgezero serve
Run the provider-specific local server:
edgezero serve --adapter <name>Arguments:
--adapter <name>- Target adapter (fastly,cloudflare,axum)
Examples:
# Run Fastly's Viceroy
edgezero serve --adapter fastly
# Run Wrangler dev server
edgezero serve --adapter cloudflare
# Run native Axum server
edgezero serve --adapter axumProvider behavior:
- Fastly: Runs
fastly compute serve - Cloudflare: Runs
wrangler dev - Axum: Runs
cargo run -p <adapter-crate>
edgezero deploy
Deploy to production:
edgezero deploy --adapter <name>Arguments:
--adapter <name>- Target adapter (fastly,cloudflare)
Examples:
# Deploy to Fastly
edgezero deploy --adapter fastly
# Deploy to Cloudflare
edgezero deploy --adapter cloudflareProvider behavior:
- Fastly: Runs
fastly compute deploy - Cloudflare: Runs
wrangler publish
WARNING
The axum adapter doesn't support deploy - use standard container/binary deployment instead.
Environment Variables
The CLI respects these environment variables:
| Variable | Description |
|---|---|
EDGEZERO_MANIFEST | Path to manifest (default: edgezero.toml) |
Working Directory
All commands expect to run from the project root where edgezero.toml is located. If the file is missing, the CLI falls back to built-in adapters (when compiled in) instead of manifest-driven commands.
Adapter Discovery
Adapters register themselves via the edgezero-adapter registry at build time. There is currently no edgezero --list-adapters command; the scaffolder includes all adapters that were compiled in.
Built-in adapters (default CLI build):
fastly- Fastly Compute@Edgecloudflare- Cloudflare Workersaxum- Native Axum/Tokio
Troubleshooting
Missing Wasm Target
error: target may not be installedInstall the required target:
rustup target add wasm32-wasip1 # For Fastly
rustup target add wasm32-unknown-unknown # For CloudflareManifest Not Found
If you rely on manifest-driven commands, ensure edgezero.toml exists or set EDGEZERO_MANIFEST. When no manifest is present, the CLI falls back to built-in adapter implementations (if compiled in) instead of using manifest commands.
Provider CLI Not Found
error: fastly: command not foundInstall the provider CLI:
- Fastly: https://developer.fastly.com/learning/compute/
- Cloudflare:
npm install -g wrangler
Next Steps
- Configure your project with edgezero.toml
- Deploy to Fastly or Cloudflare