Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.
"use strict";(self.webpackChunkwebsite=self.webpackChunkwebsite||[]).push([["1336"],{76198(e,n,s){s.r(n),s.d(n,{metadata:()=>r,default:()=>h,frontMatter:()=>a,contentTitle:()=>l,toc:()=>o,assets:()=>d});var r=JSON.parse('{"id":"getting-started/installation","title":"Installation","description":"Mercury offers standalone releases for specific desktop and server targets, plus an npm package requiring Node.js 22 or newer. Android uses the npm route through Termux.","source":"@site/docs/getting-started/installation.mdx","sourceDirName":"getting-started","slug":"/","permalink":"/docs/","draft":false,"unlisted":false,"editUrl":"https://github.com/cosmicstack-labs/mercury-agent/tree/main/website/docs/getting-started/installation.mdx","tags":[],"version":"current","frontMatter":{"id":"installation","title":"Installation","slug":"/"},"sidebar":"docsSidebar","next":{"title":"Install & first run","permalink":"/docs/desktop/mercury-desktop"}}'),t=s(74848),i=s(28453);let a={id:"installation",title:"Installation",slug:"/"},l,d={},o=[{value:"The easiest way: Mercury Desktop",id:"the-easiest-way-mercury-desktop",level:2},{value:"Pick your platform",id:"pick-your-platform",level:2},{value:"Two install paths",id:"two-install-paths",level:2},{value:"1. Standalone binary (no Node.js required)",id:"1-standalone-binary-no-nodejs-required",level:3},{value:"Standalone support limits",id:"standalone-support-limits",level:4},{value:"Failed installer updates",id:"failed-installer-updates",level:4},{value:"Environment variables",id:"environment-variables",level:4},{value:"2. npm package (requires Node.js 22+)",id:"2-npm-package-requires-nodejs-22",level:3},{value:"Upgrade",id:"upgrade",level:2},{value:"Enable the web dashboard",id:"enable-the-web-dashboard",level:2}];function c(e){let n={a:"a",admonition:"admonition",code:"code",em:"em",h2:"h2",h3:"h3",h4:"h4",li:"li",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",ul:"ul",...(0,i.R)(),...e.components};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(n.p,{children:"Mercury offers standalone releases for specific desktop and server targets, plus an npm package requiring Node.js 22 or newer. Android uses the npm route through Termux."}),"\n",(0,t.jsx)(n.h2,{id:"the-easiest-way-mercury-desktop",children:"The easiest way: Mercury Desktop"}),"\n",(0,t.jsxs)(n.p,{children:["On a Mac, Windows or Linux computer, ",(0,t.jsx)(n.a,{href:"/download",children:"download Mercury Desktop"}),". It installs Mercury for you, with no terminal, and keeps it updated. It can also connect to a Mercury on another machine. See ",(0,t.jsx)(n.a,{href:"/docs/desktop/mercury-desktop",children:"Install & first run"}),"."]}),"\n",(0,t.jsx)(n.p,{children:"The rest of this page installs the Mercury runtime from the command line: for servers, headless machines, Termux, or if you prefer the terminal."}),"\n",(0,t.jsx)(n.h2,{id:"pick-your-platform",children:"Pick your platform"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/docs/getting-started/platforms/macos",children:"macOS"})})," \u2014 ",(0,t.jsx)(n.code,{children:"curl | sh"})," installer, Homebrew-style PATH setup, Apple Silicon & Intel binaries."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/docs/getting-started/platforms/linux",children:"Linux"})})," \u2014 standalone x64/arm64 binaries for glibc-based systems."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/docs/getting-started/platforms/windows",children:"Windows"})})," \u2014 PowerShell installer, native ",(0,t.jsx)(n.code,{children:".exe"}),", optional WSL path."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/docs/getting-started/platforms/termux",children:"Termux & lightweight devices"})})," \u2014 Android (Termux), iSH, Alpine containers, Raspberry Pi."]}),"\n",(0,t.jsxs)(n.li,{children:[(0,t.jsx)(n.strong,{children:(0,t.jsx)(n.a,{href:"/docs/getting-started/platforms/cloud-instance",children:"Cloud Instance"})})," \u2014 hosted Mercury Code via ",(0,t.jsx)(n.a,{href:"https://atomicbot.ai/?utm_source=agent",children:"Atomic Bot"}),". No install needed."]}),"\n"]}),"\n",(0,t.jsx)(n.h2,{id:"two-install-paths",children:"Two install paths"}),"\n",(0,t.jsx)(n.p,{children:"Choose a route supported by your operating system and CPU."}),"\n",(0,t.jsx)(n.h3,{id:"1-standalone-binary-no-nodejs-required",children:"1. Standalone binary (no Node.js required)"}),"\n",(0,t.jsxs)(n.p,{children:["A one-line installer downloads the latest pre-built binary, verifies its SHA-256, and puts it on your ",(0,t.jsx)(n.code,{children:"PATH"}),"."]}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"# macOS / Linux\ncurl -fsSL https://mercuryagent.sh/install.sh | sh\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-powershell",children:"# Windows\nirm https://mercuryagent.sh/install.ps1 | iex\n"})}),"\n",(0,t.jsx)(n.p,{children:"The installer:"}),"\n",(0,t.jsxs)(n.ul,{children:["\n",(0,t.jsx)(n.li,{children:"Detects your OS and CPU architecture (macOS arm64/x64, Linux x64/arm64, Windows x64)."}),"\n",(0,t.jsx)(n.li,{children:"Resolves the latest GitHub release."}),"\n",(0,t.jsxs)(n.li,{children:["Verifies the SHA-256 checksum against ",(0,t.jsx)(n.code,{children:"checksums.txt"})," and tests the staged binary with ",(0,t.jsx)(n.code,{children:"--version"})," before replacing an existing installation."]}),"\n",(0,t.jsxs)(n.li,{children:["Installs to ",(0,t.jsx)(n.code,{children:"~/.mercury/bin/mercury"})," (or ",(0,t.jsx)(n.code,{children:"%USERPROFILE%\\.mercury\\bin\\mercury.exe"}),") and updates your shell ",(0,t.jsx)(n.code,{children:"PATH"}),"."]}),"\n"]}),"\n",(0,t.jsx)(n.h4,{id:"standalone-support-limits",children:"Standalone support limits"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"System"}),(0,t.jsx)(n.th,{children:"Published runtime targets"}),(0,t.jsx)(n.th,{children:"Other environments"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"macOS"}),(0,t.jsx)(n.td,{children:"arm64, x64"}),(0,t.jsx)(n.td,{children:"No 32-bit binary"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Linux"}),(0,t.jsx)(n.td,{children:"glibc-based x64, arm64"}),(0,t.jsx)(n.td,{children:"No musl/Alpine, Android/bionic, or 32-bit binary"})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:"Windows"}),(0,t.jsx)(n.td,{children:"x64, including an older-CPU baseline build"}),(0,t.jsx)(n.td,{children:"No native Windows arm64 or 32-bit binary"})]})]})]}),"\n",(0,t.jsx)(n.p,{children:"Linux x64 also has a baseline build for CPUs without AVX2. The installer can select or fall back to it, but the binary still needs a compatible operating system and libc. A baseline build does not add support for every CPU or distribution."}),"\n",(0,t.jsxs)(n.p,{children:["For Alpine, Termux, Windows on ARM, or another target without a published binary, consider the ",(0,t.jsx)(n.a,{href:"#2-npm-package-requires-nodejs-22",children:"npm route"})," if a compatible Node.js 22+ build and the package's dependencies are available. The npm package is not a guarantee of support on every machine. See the platform guides for requirements."]}),"\n",(0,t.jsx)(n.h4,{id:"failed-installer-updates",children:"Failed installer updates"}),"\n",(0,t.jsx)(n.p,{children:"The command-line installers check the downloaded binary and dashboard before replacing existing files, including a baseline fallback when needed. If a handled file-promotion failure occurs, they attempt to restore both previous artifacts. If restoration fails, the error reports a recovery directory containing the remaining backups; preserve it until recovery is complete."}),"\n",(0,t.jsx)(n.p,{children:"These steps are not an atomic transaction across the binary and dashboard. Power loss, forced termination, filesystem failures, and concurrent installers can interrupt recovery. Keep an independent backup for installations you rely on. This behavior applies to the standalone command-line installers; npm and Desktop updates have their own update paths."}),"\n",(0,t.jsx)(n.h4,{id:"environment-variables",children:"Environment variables"}),"\n",(0,t.jsxs)(n.table,{children:[(0,t.jsx)(n.thead,{children:(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.th,{children:"Variable"}),(0,t.jsx)(n.th,{children:"Default"}),(0,t.jsx)(n.th,{children:"Purpose"})]})}),(0,t.jsxs)(n.tbody,{children:[(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"MERCURY_VERSION"})}),(0,t.jsx)(n.td,{children:"latest"}),(0,t.jsxs)(n.td,{children:["Pin to a specific version, e.g. ",(0,t.jsx)(n.code,{children:"MERCURY_VERSION=1.1.9"})]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"MERCURY_INSTALL"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"$HOME/.mercury"})}),(0,t.jsxs)(n.td,{children:["Install prefix (binary lands at ",(0,t.jsx)(n.code,{children:"$MERCURY_INSTALL/bin/mercury"}),")"]})]}),(0,t.jsxs)(n.tr,{children:[(0,t.jsx)(n.td,{children:(0,t.jsx)(n.code,{children:"MERCURY_NO_PATH"})}),(0,t.jsx)(n.td,{children:(0,t.jsx)(n.em,{children:"(unset)"})}),(0,t.jsxs)(n.td,{children:["Set to ",(0,t.jsx)(n.code,{children:"1"})," to skip modifying your shell rc / user PATH"]})]})]})]}),"\n",(0,t.jsx)(n.h3,{id:"2-npm-package-requires-nodejs-22",children:"2. npm package (requires Node.js 22+)"}),"\n",(0,t.jsx)(n.p,{children:"If you already have Node.js, the npm route is the simplest:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"npm i -g @cosmicstack/mercury-agent\n"})}),"\n",(0,t.jsx)(n.p,{children:"Other package managers:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"bun add -g @cosmicstack/mercury-agent\npnpm add -g @cosmicstack/mercury-agent\nyarn global add @cosmicstack/mercury-agent\n"})}),"\n",(0,t.jsx)(n.p,{children:"Or run without installing:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"npx @cosmicstack/mercury-agent\n"})}),"\n",(0,t.jsx)(n.h2,{id:"upgrade",children:"Upgrade"}),"\n",(0,t.jsx)(n.p,{children:"Mercury includes a built-in upgrade command for npm installs:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"mercury upgrade\n"})}),"\n",(0,t.jsxs)(n.p,{children:["It stops the daemon if running, removes the old package to avoid ",(0,t.jsx)(n.code,{children:"ENOTEMPTY"}),", installs the latest version, and reports the version diff."]}),"\n",(0,t.jsxs)(n.admonition,{title:"Binary installs",type:"tip",children:[(0,t.jsxs)(n.p,{children:[(0,t.jsx)(n.code,{children:"mercury upgrade"})," is npm-aware. If you installed via the shell installer, re-run it to get the latest binary:"]}),(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"curl -fsSL https://mercuryagent.sh/install.sh | sh\n"})})]}),"\n",(0,t.jsx)(n.h2,{id:"enable-the-web-dashboard",children:"Enable the web dashboard"}),"\n",(0,t.jsx)(n.p,{children:"After installation, run the doctor or edit your config:"}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-bash",children:"mercury doctor\n"})}),"\n",(0,t.jsx)(n.pre,{children:(0,t.jsx)(n.code,{className:"language-yaml",children:"# ~/.mercury/mercury.yaml\nweb:\n enabled: true\n"})}),"\n",(0,t.jsxs)(n.p,{children:["The dashboard will be available at ",(0,t.jsx)(n.code,{children:"http://127.0.0.1:6174"})," when Mercury is running."]})]})}function h(e={}){let{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,t.jsx)(n,{...e,children:(0,t.jsx)(c,{...e})}):c(e)}},28453(e,n,s){s.d(n,{R:()=>a,x:()=>l});var r=s(96540);let t={},i=r.createContext(t);function a(e){let n=r.useContext(i);return r.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(t):e.components||t:a(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);