Documentation Index
Fetch the complete documentation index at: https://docs.codezero.io/llms.txt
Use this file to discover all available pages before exploring further.
Install cordon as an OS-managed background service that starts automatically and restarts on failure.
cordon service install
cordon service install [NAME] [OPTIONS]
| Argument/Option | Default | Description |
|---|
[NAME] | current project | Service instance name (for running multiple instances) |
--config | current project’s cordon.toml | Path to an existing config file |
This command does not create or edit cordon.toml — it only installs OS service metadata so the service runs cordon start with the config path you pass. The file must already exist, usually from cordon setup.
Services are optional. Most development workflows don’t need a background service — just run cordon start alongside your app (e.g., in a Procfile). Use cordon service install when you want the proxy to start automatically on login and restart on failure for a specific project. Each service is tied to one project’s cordon.toml.
Installs a launchd user agent at ~/Library/LaunchAgents/.cordon service install --config /path/to/cordon.toml
Installs a systemd user service at ~/.config/systemd/user/.cordon service install --config /path/to/cordon.toml
cordon service uninstall
cordon service uninstall [NAME] [--scope project|user]
| Argument / Option | Default | Description |
|---|
[NAME] | current project | Service instance name (mutually exclusive with --scope) |
--scope | project | Scope used to derive service name |
cordon service start
Start an installed cordon service.
cordon service start [NAME] [--scope project|user]
| Argument / Option | Default | Description |
|---|
[NAME] | current project | Service instance name (mutually exclusive with --scope) |
--scope | project | Scope used to derive service name |
The service must already be installed via cordon service install. If the service is already running, prints a warning and exits successfully.
cordon service stop
Stop a running cordon service.
cordon service stop [NAME] [--scope project|user]
| Argument / Option | Default | Description |
|---|
[NAME] | current project | Service instance name (mutually exclusive with --scope) |
--scope | project | Scope used to derive service name |
cordon service cleanup
List installed services whose embedded --config path no longer exists on disk (orphaned services) and remove them. Services accumulate when project directories are deleted or moved — cleanup prunes stale service definitions.
cordon service cleanup [OPTIONS]
| Option | Description |
|---|
--dry-run | List orphaned services without prompting or removing anything |
--all | Remove every orphaned service without prompting (skips running ones) |
[NAME] | Target a single service (must be orphaned) |
--dry-run and --all are mutually exclusive.
Interactive mode
With no flags, each orphan is listed and you’re prompted per service:
Remove 'cordon-a1b2c3d4'? [y/N/a/q]
- y — remove this service
- n (or blank) — keep it
- a — remove this and all remaining orphans
- q — quit and leave remaining orphans untouched
Running orphans
If an orphaned service is still running (it was started before its config was deleted), cleanup skips it and prints a hint:
⚠ Service 'cordon-deadbeef': running with missing config.
Stop it first with: cordon service stop cordon-deadbeef
Stop the service manually, then re-run cleanup.
Exit status
Cleanup exits non-zero if any removal failed.
Multiple instances
Run separate cordon instances with different configurations:
cordon service install api-proxy --config ~/configs/api-cordon.toml
cordon service install db-proxy --config ~/configs/db-cordon.toml
Each instance gets its own service with an independent lifecycle.