Skip to content

Repository files navigation

cursor-agent-service

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.

What this is

Cursor Cloud Agents can run tool calls on your machine through a self-hosted worker. This project:

  1. Installs the official Cursor CLI (if needed)
  2. Walks you through authentication (agent login)
  3. Registers a native service that keeps agent worker start --worker-dir <workspace> running
  4. Provides status, logs, doctor, update, and uninstall management 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.

Requirements

  • 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

Install

curl -fsSL https://raw.githubusercontent.com/AxLabs/cursor-agent-service/main/install.sh | bash

Check 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.

Non-interactive install flags

After the binary is installed:

cursor-agent-service install \
  --yes \
  --workspace /absolute/path/to/repo \
  --worker-name my-devbox

Platform behavior

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.

Linux credential note

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.

Management

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

Security

  • 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.

Build from source

go build -o cursor-agent-service ./cmd/cursor-agent-service
./cursor-agent-service version

License

Apache License 2.0 — see LICENSE.

Cursor is a trademark of its respective owners.

About

Run the Cursor CLI agent worker as a native OS service on Linux (systemd) or macOS (launchd).

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages