Service setup
The service is the shared backend for the CLI, TUI, web UI, watchers, curation, embeddings, and MCP HTTP. It owns the database connection and serves local HTTP APIs.
Modes
| Mode | Use when | Command |
|---|---|---|
| Foreground | Development, debugging, temporary local runs | codifix service run |
| Packaged background service | Normal Linux/macOS install | codifix service enable |
| Status inspection | Checking whether the configured service is reachable | codifix service status |
| Restart known components | Compatible singleton maintenance, after reviewing its scope | codifix service restart-all |
codifix service run
codifix service enable
codifix service status
codifix service restart-all
codifix healthcodifix service run is a foreground command. It should keep running in the terminal and should not daemonize itself. If you want background operation, use the packaged service manager.
On Linux package installs, service management may also appear through systemctl. On macOS, use codifix service enable unless a package-specific note says otherwise.
Named areas have independently pinned executables and operator-managed service
configuration. Legacy service enable/disable does not select an area, and
restart-all is not an upgrade procedure. Follow the selected-instance contract
linked from Update; inspect Areas first.
Ports
The configured service URL is the source of truth. Packaged installs commonly use 127.0.0.1:4040; development runs commonly use 127.0.0.1:4250.
codifix service status
codifix health
codifix status --project <project-slug>If a browser opens but the CLI says unauthorized, inspect the selected endpoint and identity first. Browser sessions and scoped client tokens are different credentials. Use authentication guidance; do not rotate a credential simply because the CLI selected the wrong area. For a confirmed single-user installation-token setup, inspect its provisioner:
codifix service ensure-api-token --help
codifix doctorVerify
codifix health
codifix status --project <project-slug>Healthy service setup should show:
- backend reachable
- PostgreSQL reachable
- migrations current
- API token accepted by local clients
- project config resolved
- watcher and MCP status reported when enabled
Next
Read Operations for day-two service tasks.