Skip to content
CLI

Daemon mode

Keep the Neox service running in the background: tasks continue after you close the terminal, and it can start at login.

By default, neox runs the agent in the current process; closing the terminal ends the turn. You don't need the daemon for everyday use.

The daemon keeps the Neox service running in the background. It's useful when:

  • A task is long and should keep going after you close the terminal
  • Several terminal windows should share one background service
  • You want it to start at login

Subcommands

CommandDescription
neox daemon start [--port <port>] [--workdir <path>]Start the background service; a port is picked automatically if you don't give one
neox daemon stopStop
neox daemon restartRestart
neox daemon statusStatus: PID, port, working directory, uptime, log location
neox daemon logs [-n <lines>]Show logs, last 50 lines by default
neox daemon installStart at login (launchd on macOS, systemd on Linux; not supported on Windows)

Connecting the CLI to the daemon

NEOX_USE_DAEMON=1 neox

With this variable set, neox connects to the background service and starts one first if none is running. Without it, neox runs in the current process as usual and doesn't connect to the daemon.

Logs

~/.neox/server.log, or just run neox daemon logs.

Security

Connecting to the daemon requires an access token stored in a file only your account can read, so other users on the same machine can't connect.

Relationship to the desktop app

The desktop app and editor plugins run their own engines and don't connect to the CLI daemon. Picking up a desktop session on your phone is multi-device sync, which has nothing to do with the daemon.