Run the Cursor CLI agent worker as a native OS service on Linux (systemd) or macOS (launchd).
AxLabs is not affiliated with Cursor.
This project does not redistribute or modify the Cursor CLI. It invokes the official Cursor installer and supervises Cursor’s supported long-running mode:agent worker start. Cursor CLI remains proprietary software subject to the Cursor Terms of Service.
Cursor Cloud Agents can run tool calls on your machine through a self-hosted worker. This project:
- Installs the official Cursor CLI (if needed)
- Walks you through authentication (
agent login) - Registers a native service that keeps
agent worker start --worker-dir <workspace>running - Provides
status,logs,doctor,update, anduninstallmanagement commands
This is not a local prompt API or a forever-running interactive agent TUI. Jobs arrive through Cursor’s Cloud Agent control plane. See My Machines.
- OS: Linux (systemd) or macOS (launchd). Windows, BSD, and others are not supported.
- Arch: amd64 or arm64
- Account: a Cursor account entitled to use Cloud Agent / My Machines workers
- Workspace: one existing directory (typically a Git repository) the worker may access
- Network: outbound HTTPS to Cursor
curl -fsSL https://raw.githubusercontent.com/AxLabs/cursor-agent-service/main/install.sh | bashCheck the source code in the repository: https://github.com/AxLabs/cursor-agent-service
The bootstrap downloads a checksum-verified release binary into ~/.local/bin, then runs interactive setup.
After the binary is installed:
cursor-agent-service install \
--yes \
--workspace /absolute/path/to/repo \
--worker-name my-devbox| Platform | Supervisor | When it runs | Privileges |
|---|---|---|---|
| Linux | systemd system unit as your non-root user | At boot (independent of GUI login) | sudo only to install/enable the unit |
| macOS | per-user LaunchAgent | At GUI login; stops at logout | No root required |
The worker never runs as root.
A boot-time systemd unit may start before an interactive session. If Cursor credentials are unavailable, consider Cursor’s file credential store (AGENT_CLI_CREDENTIAL_STORE=file) with the understanding that the file is owner-only but not encrypted. See authentication docs.
cursor-agent-service status
cursor-agent-service logs --follow
cursor-agent-service doctor
cursor-agent-service stop
cursor-agent-service start
cursor-agent-service restart
cursor-agent-service update
cursor-agent-service uninstall # keeps Cursor CLI + config
cursor-agent-service uninstall --purge # also removes project config/logs/state- The worker executes terminal, filesystem, browser, and MCP tool calls with your OS user privileges.
- File contents needed for inference may leave the machine for Cursor’s cloud.
- Prefer a dedicated machine or restricted repository root; rotate credentials; review Cursor’s agent security guidance.
- See SECURITY.md for reporting vulnerabilities in this project.
go build -o cursor-agent-service ./cmd/cursor-agent-service
./cursor-agent-service versionApache License 2.0 — see LICENSE.
Cursor is a trademark of its respective owners.