Appearance
CLI Reference
The corral command-line interface provides full control over your local development environment. Every feature available in the macOS app is also available from the terminal.
Global Flags
| Flag | Description |
|---|---|
--json | Output results as JSON instead of formatted text |
--data-dir <path> | Override the data directory (default: ~/.corral) |
The data directory can also be set via the CORRAL_DATA_DIR environment variable.
Project Resolution
Commands that accept a <project> argument resolve it in this order:
- UUID — exact match
- Name — exact match (case-insensitive)
- Substring — if the input matches part of a project name (must be unambiguous)
If a substring matches multiple projects, the command will error and ask you to be more specific.
Lifecycle
corral up
Start infrastructure (DNS + reverse proxy) and all auto-start projects.
sh
corral upcorral down
Stop all running projects and infrastructure.
sh
corral downcorral status
Show infrastructure state and running projects.
sh
corral statuscorral start <project>
Start a single project.
sh
corral start my-workercorral stop <project>
Stop a running project.
sh
corral stop my-workercorral restart <project>
Stop and restart a project.
sh
corral restart my-workerProjects
corral project list
List all registered projects with their path, subdomain, auto-start status, and current state.
sh
corral project listcorral project add <path>
Register a project directory. Corral detects the wrangler config and parses it automatically.
sh
corral project add ./my-worker
corral project add /Users/me/code/api-servicecorral project remove <project>
Unregister a project. Does not delete any files.
sh
corral project remove my-workercorral project info <project>
Show detailed project information: ID, path, type, bindings, settings, and running state.
sh
corral project info my-workercorral project scan <directory>
Find all directories containing a wrangler config file.
sh
corral project scan ~/code/cloudflarecorral project refresh <project>
Re-read the wrangler config from disk. Useful after editing wrangler.toml.
sh
corral project refresh my-workercorral project set <project> <key> <value>
Update a project setting.
sh
corral project set my-worker node-version 22
corral project set my-worker subdomain api
corral project set my-worker environment staging
corral project set my-worker auto-start trueAvailable keys: node-version, subdomain, environment, auto-start
Clearing a value: use none for optional fields:
sh
corral project set my-worker node-version noneBoolean values: true/false, yes/no, 1/0, on/off
Node.js
corral node list
Show installed Node.js versions.
sh
corral node listcorral node available
Show Node.js versions available for download (20 most recent).
sh
corral node available
corral node available --lts| Flag | Description |
|---|---|
--lts | Show only LTS releases |
corral node install <version>
Download and install a Node.js version.
sh
corral node install 22.3.0
corral node install 22
corral node install ltscorral node remove <version>
Remove an installed Node.js version.
sh
corral node remove 22.3.0Command Execution
corral exec <command> [args...]
Run a command using the resolved Node.js version for the current directory.
sh
corral exec node -v
corral exec npx vitest run| Flag | Description |
|---|---|
--node-version <version> | Override version resolution |
Also respects the CORRAL_NODE_VERSION environment variable (flag takes precedence).
TIP
corral exec replaces the current process — it does not wrap or fork. Exit codes and signals pass through directly.
corral npm [args...]
Shorthand for corral exec npm.
sh
corral npm install
corral npm run buildcorral npx [args...]
Shorthand for corral exec npx.
sh
corral npx vitest
corral npx wrangler deployShell Shims
corral install-shims
Install node, npm, npx shims to ~/.corral/bin/.
sh
corral install-shims| Flag | Description |
|---|---|
--patch-profile | Add ~/.corral/bin to PATH in your shell profile |
corral uninstall-shims
Remove shims and undo shell profile changes.
sh
corral uninstall-shimsUninstall
corral uninstall
Completely remove Corral and all its data from macOS. This performs a full cleanup:
- Removes the CA certificate from the system keychain
- Kills any orphaned Caddy and dnsmasq processes
- Removes the DNS resolver file (
/etc/resolver/{tld}) - Removes the privileged helper daemon
- Deletes the data directory (
~/.corral) - Clears app preferences
- Removes shell profile shims
- Removes the CLI symlink (
/usr/local/bin/corralor~/.corral/bin/corral)
sh
corral uninstallYou will be prompted for confirmation before anything is removed. Use --force to skip the prompt:
sh
corral uninstall --force| Flag | Description |
|---|---|
--force | Skip the confirmation prompt |
WARNING
This is destructive and irreversible. All installed Node.js versions, project registrations, settings, and logs will be deleted.
Update
corral update
Check for and install the latest version of the CLI.
sh
corral update| Flag | Description |
|---|---|
--check | Check for updates without installing |
sh
corral update --checkTIP
If the CLI is part of the macOS app bundle, this command will tell you to update the app instead.
Install
corral install app
Download and install the macOS app to /Applications.
sh
corral install app| Flag | Description |
|---|---|
--force | Reinstall even if the app is already present |
After installing, the CLI symlink is repointed to the binary inside the app bundle.
Logs
corral logs [project]
View logs. Omit the project name to see logs from all projects.
sh
corral logs
corral logs my-worker| Flag | Short | Description |
|---|---|---|
--follow | -f | Stream logs in real-time |
--tail <n> | -t | Show only the last N entries (default: 50 in follow mode) |
--search <query> | -s | Filter by text content (case-insensitive) |
Examples:
sh
# Stream all logs
corral logs --follow
# Last 10 entries from a project, then stream
corral logs my-worker -f -t 10
# Search across all logs
corral logs --search "error"Settings
corral settings show
Display current app settings.
sh
corral settings showcorral settings set <key> <value>
Update a setting.
sh
corral settings set tld localhost
corral settings set auto-start true
corral settings set default-node-version 22
corral settings set port-range-start 9000Available keys: tld, auto-start, default-node-version, port-range-start
Clear optional settings with none:
sh
corral settings set default-node-version noneInfrastructure
corral infra start
Start DNS and proxy services.
sh
corral infra startcorral infra stop
Stop DNS and proxy services.
sh
corral infra stopcorral infra status
Show infrastructure state.
sh
corral infra statusData Inspection
corral data bindings <project>
Show a summary of all bindings and their local data status.
sh
corral data bindings my-workercorral data d1 tables <project> <binding>
List tables in a D1 database.
sh
corral data d1 tables my-worker MY_DBcorral data d1 query <project> <binding> <table>
Query rows from a D1 table.
sh
corral data d1 query my-worker MY_DB users
corral data d1 query my-worker MY_DB users --limit 20 --offset 40| Flag | Default | Description |
|---|---|---|
--limit | 50 | Maximum rows to return |
--offset | 0 | Row offset for pagination |
corral data kv keys <project> <binding>
List keys in a KV namespace.
sh
corral data kv keys my-worker MY_KV
corral data kv keys my-worker MY_KV --prefix user:| Flag | Default | Description |
|---|---|---|
--prefix | (none) | Filter keys by prefix |
--limit | 50 | Maximum keys to return |
--offset | 0 | Key offset for pagination |
corral data kv get <project> <binding> <key>
Get a KV entry's value.
sh
corral data kv get my-worker MY_KV user:123corral data r2 objects <project> <binding>
List objects in an R2 bucket.
sh
corral data r2 objects my-worker MY_BUCKET
corral data r2 objects my-worker MY_BUCKET --prefix uploads/| Flag | Default | Description |
|---|---|---|
--prefix | (none) | Filter objects by prefix |
--limit | 50 | Maximum objects to return |
--offset | 0 | Object offset for pagination |
corral data do instances <project> <binding>
List Durable Object instances.
sh
corral data do instances my-worker MY_DO