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.
All CLI commands communicate with a background daemon that manages process state. The daemon starts automatically on the first command — you don't need to start it manually.
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.
Daemon
The daemon is the background process that holds all running state. It starts automatically and stays alive until explicitly stopped.
corral daemon start
Start the daemon in the background. No-op if already running.
corral daemon stop
Stop the running daemon. Sends a graceful shutdown request, falls back to SIGTERM.
corral daemon status
Show whether the daemon is running, its PID, and the socket path.
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, git repository and branch, bindings, settings, and running state. Git information (repository URL, host, and current branch) is included when the project has a detected git remote.
sh
corral project info my-workercorral project scan <directory>
Find all directories containing a recognized project (Cloudflare, Next.js, Vite, etc.).
sh
corral project scan ~/codecorral 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 true
corral project set my-worker dev-command "npm run dev"
corral project set my-worker package-manager pnpmAvailable keys: node-version, subdomain, environment, auto-start, dev-command, package-manager
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
corral project open <project>
Open the project's .test domain in your default browser.
sh
corral project open my-worker| Flag | Description |
|---|---|
--localhost | Open http://localhost:<port> instead of the .test domain (project must be running) |
sh
corral project open my-worker --localhostcorral project open-repo <project>
Open the project's git repository in your default browser.
sh
corral project open-repo my-workerThe remote URL is detected when the project is added. If no git remote is found, the command will error and suggest running corral project refresh.
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 deploycorral pm [args...]
Universal package manager command. Resolves the correct package manager for your project (npm, yarn, pnpm, or bun) and translates your command into the right syntax.
sh
corral pm install
corral pm add react
corral pm add -D vitest
corral pm remove lodash
corral pm run dev
corral pm test| Flag | Description |
|---|---|
--node-version <version> | Override Node.js version resolution |
--about | Show which package manager would be used and why |
Resolution order:
- Per-project
package-managersetting - Lockfile detection (
package-lock.json,yarn.lock,pnpm-lock.yaml,bun.lockb/bun.lock) - App-wide
default-package-managersetting - Fallback: npm
Bidirectional syntax: Both npm-style and yarn/pnpm-style commands work regardless of the underlying package manager:
sh
# These do the same thing — add a dependency
corral pm install react # npm style
corral pm add react # yarn/pnpm style
# These do the same thing — remove a dependency
corral pm uninstall lodash # npm style
corral pm remove lodash # yarn/pnpm styleEvery invocation prints the resolved package manager to stderr (e.g., ▸ pnpm) so you always know what's running.
Diagnostics: Use --about to see the full resolution chain:
sh
corral pm --about
# Package manager pnpm
# Source lockfile (pnpm-lock.yaml)
# Project my-api
# Project override (not set)
# App default npm
# Node.js v22.14.0TIP
After installing shims, you can use cpm as a shorthand for corral pm:
sh
cpm install
cpm add -D vitest
cpm run devShell Shims
corral install-shims
Install node, npm, npx, and cpm 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 9000
corral settings set default-package-manager pnpmAvailable keys: tld, auto-start, default-node-version, port-range-start, default-package-manager
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 d1 schema <project> <binding> <table>
Show column schema for a D1 table.
sh
corral data d1 schema my-worker MY_DB usersDisplays column name, type, nullable, default value, and primary key status.
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 r2 get <project> <binding> <key>
Download an R2 object. By default, writes raw bytes to stdout (suitable for piping). Use --output to save to a file.
sh
corral data r2 get my-worker MY_BUCKET image.png --output ./image.png
corral data r2 get my-worker MY_BUCKET config.json > config.json| Flag | Description |
|---|---|
--output, -o | Write to a file instead of stdout |
corral data do instances <project> <binding>
List Durable Object instances.
sh
corral data do instances my-worker MY_DOcorral data do storage <project> <binding> <instance_id>
List storage entries for a Durable Object instance.
sh
corral data do storage my-worker MY_DO abc123def456
corral data do storage my-worker MY_DO abc123def456 --limit 20 --offset 0| Flag | Default | Description |
|---|---|---|
--limit | 50 | Maximum entries to return |
--offset | 0 | Entry offset for pagination |
corral data secrets list <project> <binding>
List secrets in a Secrets Store binding.
sh
corral data secrets list my-worker API_KEY| Flag | Default | Description |
|---|---|---|
--limit | 50 | Maximum secrets to return |
--offset | 0 | Secret offset for pagination |
corral data secrets get <project> <binding> <name>
Get a secret's value.
sh
corral data secrets get my-worker API_KEY my-api-keycorral data secrets create <project> <binding> <name>
Create a secret. The value is read from stdin — in an interactive terminal you will be prompted, or you can pipe it:
sh
corral data secrets create my-worker API_KEY my-api-key
echo "sk-1234" | corral data secrets create my-worker API_KEY my-api-keycorral data secrets delete <project> <binding> <name>
Delete a secret.
sh
corral data secrets delete my-worker API_KEY my-api-keycorral data workflow instances <project> <binding>
List workflow instances with status, step count, and size.
sh
corral data workflow instances my-worker MY_WORKFLOWcorral data workflow detail <project> <binding> <instance_id>
Show details for a workflow instance including steps, params, and status.
sh
corral data workflow detail my-worker MY_WORKFLOW abc123def456Shell Completions
corral completions <shell>
Generate shell completion scripts. Supported shells: bash, zsh, fish.
sh
# Zsh (add to ~/.zshrc)
corral completions zsh > ~/.corral/_corral
fpath=(~/.corral $fpath)
# Bash (add to ~/.bashrc)
corral completions bash > ~/.corral/corral.bash
source ~/.corral/corral.bash
# Fish
corral completions fish > ~/.config/fish/completions/corral.fishDiagnostics
corral doctor
Run a system health check. Verifies that all infrastructure components are configured and responding.
sh
corral doctorChecks performed:
| Check | What it verifies |
|---|---|
| Daemon | Background daemon is running |
| DNS resolver | /etc/resolver/{tld} file exists |
| dnsmasq | DNS server is responding on 127.0.0.1 |
| Caddy | Reverse proxy is responding |
| Node.js | At least one version is installed |
| Shims | Shell shims are installed and in PATH |
Each check reports pass or fail with an actionable message on failure. Use --json for machine-readable output.