Skip to main content
Install cordon as an OS-managed background service that starts automatically and restarts on failure.

cordon service install

cordon service install [NAME] [OPTIONS]
Argument/OptionDefaultDescription
[NAME]current projectService instance name (for running multiple instances)
--configcurrent project’s cordon.tomlPath 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

cordon service uninstall

cordon service uninstall [NAME]
ArgumentDefaultDescription
[NAME]current projectService instance 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]
OptionDescription
--dry-runList orphaned services without prompting or removing anything
--allRemove 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.