Skip to Content

machine.json

Where a machine connects, the name it shows, and how its program starts. Change it with cmdop config set; what agents may do lives in ceiling.json.

Where it lives

The machine’s config folder: ~/Library/Application Support/cmdop/machine.json on macOS, ~/.config/cmdop/machine.json on Linux. A running program reads it at its next start. cmdop run --server and --name override it for one run.

Keys

KeyTypeDefaultMeaning
schema_versioninteger1The shape of the file. cmdop config migrate rewrites an older file.
serverstringnonewss://<contour>.cmdop.ai/ws/machine, the address your page shows.
namestringthe host nameHow the machine shows on your page and to agents.
daemon.autostartbooleantrueStart the machine program on its own: at login, or at boot for a system service.
daemon.restarton_failure | neveron_failureRestart it after it fails.
gui.enabledbooleantrueAllow the CMDOP app (menu bar and window) on this machine.
gui.autostartbooleantrueStart the app when you log in.
gui.launchwhen_daemon_ready | login | manualwhen_daemon_readyWhen the app opens.
service.scopeuser | systemuserRun as your user’s service or as a system service.
service.managerauto | launchd | systemd | windowsautoWhich service manager starts it; auto picks the system’s own.

Each policy key can also be set for one run with an environment variable.

Example

{ "schema_version": 1, "server": "wss://<contour>.cmdop.ai/ws/machine", "name": "build-box", "daemon": { "autostart": true, "restart": "on_failure" }, "gui": { "enabled": false, "autostart": false, "launch": "manual" }, "service": { "scope": "user", "manager": "auto" } }

Errors

  • A key the program does not know is an error: machine.json is read strictly, so a typo stops the start instead of being ignored. Fix the key, or set values with cmdop config set.
  • cmdop config migrate keeps a backup of the file it replaces; --rollback <backup> restores it.

cmdop command line · Environment variables