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([["788"],{63505(e,t,r){r.r(t),r.d(t,{metadata:()=>n,default:()=>u,frontMatter:()=>a,contentTitle:()=>o,toc:()=>d,assets:()=>c});var n=JSON.parse('{"id":"getting-started/starting","title":"Starting Mercury","description":"The easiest way to run Mercury persistently. Installs the system service if needed, starts the daemon, and ensures it\'s running.","source":"@site/docs/getting-started/starting.mdx","sourceDirName":"getting-started","slug":"/getting-started/starting","permalink":"/docs/getting-started/starting","draft":false,"unlisted":false,"editUrl":"https://github.com/cosmicstack-labs/mercury-agent/tree/main/website/docs/getting-started/starting.mdx","tags":[],"version":"current","frontMatter":{"id":"starting","title":"Starting Mercury"},"sidebar":"docsSidebar","previous":{"title":"First-Time Setup","permalink":"/docs/getting-started/setup"},"next":{"title":"Build From Source","permalink":"/docs/getting-started/build-from-source"}}'),s=r(74848),i=r(28453);let a={id:"starting",title:"Starting Mercury"},o,c={},d=[{value:"Start (background daemon)",id:"start-background-daemon",level:2},{value:"Foreground (interactive)",id:"foreground-interactive",level:2},{value:"Verbose logging",id:"verbose-logging",level:2}];function l(e){let t={admonition:"admonition",code:"code",h2:"h2",p:"p",pre:"pre",...(0,i.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(t.admonition,{title:"Recommended: mercury up",type:"tip",children:(0,s.jsx)(t.p,{children:"The easiest way to run Mercury persistently. Installs the system service if needed, starts the daemon, and ensures it's running."})}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"mercury up\n"})}),"\n",(0,s.jsxs)(t.p,{children:["If Mercury is already running, ",(0,s.jsx)(t.code,{children:"mercury up"})," just confirms it and shows the PID. If the service isn't installed yet, it installs it first, then starts the daemon."]}),"\n",(0,s.jsx)(t.h2,{id:"start-background-daemon",children:"Start (background daemon)"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"mercury start\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Starts Mercury as a background daemon by default. Telegram becomes your primary interface. Logs go to ",(0,s.jsx)(t.code,{children:"~/.mercury/daemon.log"}),". Stale PID files are auto-cleaned. Includes crash recovery with exponential backoff."]}),"\n",(0,s.jsx)(t.h2,{id:"foreground-interactive",children:"Foreground (interactive)"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"mercury start --foreground\n"})}),"\n",(0,s.jsxs)(t.p,{children:["Runs Mercury attached to your terminal with the Ink TUI interface. Press ",(0,s.jsx)(t.code,{children:"Ctrl+C"})," to exit. The CLI supports chat, coding workspace mode, progress views, and interactive permission prompts. Shorthand: ",(0,s.jsx)(t.code,{children:"mercury start -f"}),"."]}),"\n",(0,s.jsx)(t.p,{children:"When running in background mode, you can stop it with:"}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"mercury stop\n"})}),"\n",(0,s.jsx)(t.h2,{id:"verbose-logging",children:"Verbose logging"}),"\n",(0,s.jsxs)(t.p,{children:["Add ",(0,s.jsx)(t.code,{children:"--verbose"})," to any start command to see debug logs on stderr:"]}),"\n",(0,s.jsx)(t.pre,{children:(0,s.jsx)(t.code,{className:"language-bash",children:"mercury start --verbose\n"})})]})}function u(e={}){let{wrapper:t}={...(0,i.R)(),...e.components};return t?(0,s.jsx)(t,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},28453(e,t,r){r.d(t,{R:()=>a,x:()=>o});var n=r(96540);let s={},i=n.createContext(s);function a(e){let t=n.useContext(i);return n.useMemo(function(){return"function"==typeof e?e(t):{...t,...e}},[t,e])}function o(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:a(e.components),n.createElement(i.Provider,{value:t},e.children)}}}]);