@cloudless-ai/node-agent
Install and manage the Cloudless AI node agent from npm.
Install
npm install -g @cloudless-ai/node-agent
During install, the script:
- Detects your OS/CPU architecture.
- Downloads the precompiled binaries for the current OS and CPU architecture from the matching versioned GitHub release, then verifies each asset's size and SHA-256 before installation. Only the current platform is downloaded. Linux amd64 selects the ROCm-enabled agent when an AMD GPU,
/dev/kfd, and the ROCm runtime libraries are detected; Windows amd64 selects it when an AMD display adapter and HIP SDK runtime DLLs are detected. The ROCm agent and Windows HIP loader DLLs are downloaded only when ROCm is selected. Set CLOUDLESS_NODE_AGENT_USE_ROCM=0 to keep the standard agent or CLOUDLESS_NODE_AGENT_USE_ROCM=1 to force the ROCm agent. See AMD ROCm on Linux and Windows build and HIP requirements. Linux ROCm runtime libraries are not bundled. On Windows, rocBLAS and hipBLAS still require the installed HIP SDK and must be available on PATH. On supported Apple silicon Macs, it also installs the signed Foundation Models helper; that model is available only on macOS 26+ when macOS reports Apple Intelligence ready.
- Also installs the
CloudlessMenuBar menu bar / system tray app and registers it to start at login (macOS LaunchAgent app.cloudless.node-agent; Windows HKCU\Software\Microsoft\Windows\CurrentVersion\Run\CloudlessAINodeTray; Linux XDG autostart entry ~/.config/autostart/cloudless-ai-node-tray.desktop, only when installed from a desktop session). On all three platforms, the tray restarts the node agent if it exits. Windows registers a per-user Task Scheduler supervisor task plus a separate one-minute watchdog task that requests the supervisor task to run; explicit Quit and cloudless-node stop persist a stop request, which disables the watchdog so recovery cannot undo an intentional stop. Stop waits for the tray and agent to exit cleanly before force-killing any process that remains. Turn start-at-login off later from the app's "Start on Login" item or cloudless-node autostart off, or skip it at install with CLOUDLESS_NO_START_ON_LOGIN=1.
- Points
~/.cloudless/agent.yaml at the production router (https://api.gocloudless.ai). An existing token is kept if it was already for production, including the legacy https://api.cloudless-ai.app address; otherwise it is cleared and the node links itself via browser sign-in on first start (or from the tray's "Connect" item).
- Stops any running menu bar app/tray, launcher supervisor, and agent from a previous install; waits for an active updater to finish; installs the new binaries; and quarantines stale update journal/child handoff files without deleting backups. Once binaries and configuration are installed, it writes the owner-private
~/.cloudless/install-source.json marker with the canonical agent path, digest, and selected variant, then starts the menu bar app / tray right away (on Linux only in a desktop session, i.e. when DISPLAY or WAYLAND_DISPLAY is set). A headless Linux install does not start the agent or configure boot startup; an already-running systemd user service is restarted after an npm update. On macOS it is started as a launchd job even when start-at-login is disabled. On Linux and Windows, the tray executable supervises its visible tray process. Each tray supervises the node agent, restarting it after crashes and stopping it on intentional quit. On a fresh interactive install your browser opens so you can sign in and link the node to Cloudless AI. Set CLOUDLESS_NO_LAUNCH=1 to skip starting it (it is also skipped when CI is set, and on macOS and Linux when installing as root, e.g. with sudo).
Automatic agent updates
Stable npm releases include a compatible local updater and signed release metadata. Automatic updates are enabled by default only for a signed, key-configured agent build whose executable path and digest match the owner-private ~/.cloudless/install-source.json marker written after a successful npm install. An eligible npm-managed node checks for stable agent releases at startup and periodically thereafter. Downloads are verified before installation, and replacement waits until inference and model installation are idle. ROCm installations keep receiving the ROCm variant from signed Linux or Windows update archives. Only the cloudless-agent executable changes; the tray/menu-bar app, Apple helper, npm package, configuration, credentials, models, and logs remain in place. The node briefly restarts, so inference may be unavailable during that handoff.
Set updates.auto_update: false in ~/.cloudless/agent.yaml to opt out; restart the agent for configuration changes to take effect. Direct agent runs with custom config paths or CLI overrides are intentionally ineligible, so updates cannot accidentally drop their configuration or credentials. cloudless-node start --interactive and other launcher-supervised runs retain their supplied arguments across a supervised restart. The current supported update targets are macOS arm64, Linux amd64/arm64, and Windows amd64/arm64; macOS amd64 and installations not owned by this npm installer do not auto-update. WinGet, manual, unsigned, keyless, and unknown-source installs remain under their existing upgrade owner.
Existing npm installations must first upgrade once using npm install -g @cloudless-ai/node-agent to install the updater and ownership marker. If local recovery is required, use the bundled updater:
~/.cloudless/bin/cloudless-node-updater recover --journal ~/.cloudless/update-state.json
On Windows, run cloudless-node-updater.exe recover --journal "$HOME/.cloudless/update-state.json" from PowerShell. Do not delete the journal or backup files while recovery is pending.
If recovery cannot use the saved backup, upgrade/reinstall the trusted npm package. The installer waits for any running updater, moves stale journal/handoff files aside before starting the agent, and preserves backup files for diagnosis.
Commands
cloudless-node start
cloudless-node start --interactive
cloudless-node menubar
cloudless-node stop
cloudless-node set-api-key
cloudless-node configure
cloudless-node autostart on|off
cloudless-node service install
cloudless-node service enable|start|stop|disable|status
cloudless-node start starts the agent in the background for the current boot/session; it does not configure future boot startup. On Windows, a separate per-user watchdog task requests the outer supervisor task to start once a minute; the supervisor task ignores duplicate starts while healthy. A persisted explicit stop request disables the watchdog until the next cloudless-node start. cloudless-node start --interactive keeps the supervisor in the foreground for a service manager. cloudless-node autostart on|off controls the desktop tray's XDG login entry on Linux and the Windows Run-key entry; both still require a logged-in desktop session. For headless Linux boot startup, use the per-user systemd service below.
Headless Linux boot startup with systemd
The service runs as the account that owns ~/.cloudless, not as root. Because it is a user service that must run without an interactive login, enable lingering for that account once (this administrator action is not performed by npm):
sudo loginctl enable-linger "$USER"
cloudless-node service install
service install writes ~/.config/systemd/user/cloudless-node.service, reloads the user manager, then enables and starts the service. It uses the absolute Node.js executable running the CLI, so Node installed through nvm or another non-system location works; rerun service install if that Node executable or the npm package path changes. The unit runs cloudless-node start --interactive and contains no API key; credentials remain in ~/.cloudless/agent.yaml.
Manage the installed service with:
cloudless-node service enable # enable at boot without starting now
cloudless-node service start # start now
cloudless-node service stop # stop now; enabled service still starts next boot
cloudless-node service disable # stop and disable boot startup
cloudless-node service status
Uninstall
npm has no uninstall hook, so stop the node and remove the start-at-login registration first:
cloudless-node stop # stops the node (including the menu bar app/tray and its agent)
cloudless-node autostart off
cloudless-node service disable
rm ~/.config/systemd/user/cloudless-node.service
systemctl --user daemon-reload
npm uninstall -g @cloudless-ai/node-agent
Binaries, models and config under ~/.cloudless are left in place; delete that directory to remove them.
Non-interactive install
CLOUDLESS_NODE_API_KEY=your_node_key npm install -g @cloudless-ai/node-agent
Install always targets the production router. To point a node at a different router (for example local development), run cloudless-node configure after install.
Notes
- Run the installer/launcher tests with
npm test (Node's built-in test runner, no dependencies).
- Changes to the install/update flow also require the opt-in full-agent manual rehearsal: run
python3 scripts/node-update-rehearsal/run.py docker from the repository root, and the macos target for macOS-specific changes. It is intentionally excluded from default GitHub Actions and npm test.
- By default binaries are installed to
~/.cloudless/bin.
- Configuration is written to
~/.cloudless/agent.yaml.
cloudless-node start launches the node in the background by default. On macOS, Windows and Linux desktops it starts the menu bar app / tray, which owns the agent (only one runs per user session).
- Use
cloudless-node start --interactive to keep it attached to your terminal (this runs the agent alone, without the menu bar app / tray).
- The npm tarball contains the installer, not platform binaries. Installation requires access to the matching published GitHub release, but downloads only the current platform's files and the selected agent variant. The npm publish workflow waits until that release is published so its binary assets are publicly available.
CLOUDLESS_NODE_AGENT_RELEASE_BASE_URL can point to an HTTPS-compatible release mirror; downloaded assets are still checked against the package manifest's size and SHA-256. Loopback HTTP URLs are accepted for local testing.
- Upgrading stops the running menu bar app/tray and agent, installs the new binaries and starts the new menu bar app/tray. On Windows any still-locked binary is moved aside as
*.old-<timestamp> and cleaned up on the next install; on macOS the old file is unlinked first so the new signed binary isn't killed by the code-signature cache.
- For internet demos, set
router.advertise_address in ~/.cloudless/agent.yaml (or CLOUDLESS_AGENT_ADVERTISE_ADDRESS) to a public tunnel URL so router/dashboard can reach this node.