Daemon
Understand and manage the persistent Ratel Local background service.
Ratel Local runs one daemon per user. Agent plugins start a lightweight connect
bridge; the daemon owns upstream connections, project-scoped gateways, the browser UI,
and control-plane writes.
Sessions in the same canonical project can reuse upstream connections. User, project, and local configurations stay isolated, and an existing session keeps its acquired gateway generation while a newly connected session receives the latest revision.
Recommended setup
ratel-local setupSetup installs a macOS launchd or Linux user-systemd service, starts it, replaces an incompatible version, and offers agent onboarding. Re-running setup is safe.
Use daemon-only mode when agent configuration is managed elsewhere:
ratel-local setup --daemon-only --yesThe default port is 5731. Choose another port only on first installation:
ratel-local setup --daemon-only --yes --port 7331Lifecycle commands
ratel-local daemon status
ratel-local daemon start
ratel-local daemon stop
ratel-local daemon restart
ratel-local daemon openstatus probes the configured loopback endpoint. A running response includes its pid,
upstream count, active MCP-client count, and MCP endpoint.
open creates a fresh authenticated browser session. The daemon listens on loopback;
do not share the bearer-bearing session URL.
Lower-level service commands are available for repair:
ratel-local daemon install
ratel-local daemon uninstalluninstall stops and removes the login service. It does not delete Ratel configuration,
OAuth state, backups, or saved Cloud settings.
Foreground mode
Run the daemon in the current terminal when a login service is unavailable:
ratel-local daemon run --no-open --auto-configStop it with Control-C. --port 0 is valid only for a foreground run; an installed
service needs a stable port.
Projects and reconnects
The connector resolves a project from --project-root, RATEL_PROJECT_ROOT,
CLAUDE_PROJECT_DIR, then its working directory. Inspect registered roots with:
ratel-local project list
ratel-local project add /path/to/project
ratel-local project remove /path/to/projectproject remove forgets the registry entry without deleting project files.
Reconnect the affected agent after MCP, skill, retrieval, or OAuth changes. New sessions acquire the new immutable gateway generation; existing sessions drain on the old one.
Upgrade or reconfigure
Upgrade the global CLI, then run setup once:
npm install --global @ratel-ai/ratel-local
ratel-local setup
ratel-local daemon statusSetup replaces an older daemon and reconciles the selected Claude Code or Codex plugin. Configuration remains in place.
To change the installed port, recreate the service explicitly:
ratel-local daemon uninstall
ratel-local daemon install --port 7331Re-run ratel-local setup --agent <agent> when you need to repair or add an agent link.
Remove Ratel Local
- Remove or disable the Ratel Local plugin or explicit MCP entry in each host.
- Run
ratel-local statusline uninstallif you installed the Claude Code statusline. - Remove scoped skills you no longer want Ratel to manage.
- Run
ratel-local daemon uninstall. - Run
npm uninstall --global @ratel-ai/ratel-local.
Your ~/.ratel and project .ratel data remain for recovery. Back them up and remove
them separately only when you no longer need configuration, OAuth state, or snapshots.