Installation
Mercury requires Node.js 20+. Install with npm:
npm i -g @cosmicstack/mercury-agent
Or run without installing:
npx @cosmicstack/mercury-agent
Upgrade
Mercury includes a built-in upgrade command that handles the full update cycle:
mercury upgrade
This command:
- Checks npm for the latest published version
- Stops the daemon if running, to avoid conflicts
- Removes the old package first to prevent
ENOTEMPTYerrors - Installs the latest version globally
- Shows the before/after version comparison
ENOTEMPTY fix
If you see ENOTEMPTY: directory not empty, rename when running npm i -g manually, use mercury upgrade instead — it removes the old package directory before installing the new one.