Skip to content

Soul-driven AI agent with permission-hardened tools, token budgets, and multi-channel access. Runs 24/7 from CLI, Telegram or More.

1.1 KB
Raw Blame
---
id: starting
title: Starting Mercury
---

:::tip[Recommended: mercury up]

The easiest way to run Mercury persistently. Installs the system service if needed, starts the daemon, and ensures it's running.

:::

```bash
mercury up
```

If Mercury is already running, `mercury up` just confirms it and shows the PID. If the service isn't installed yet, it installs it first, then starts the daemon.

## Start (background daemon)

```bash
mercury start
```

Starts Mercury as a background daemon by default. Telegram becomes your primary interface. Logs go to `~/.mercury/daemon.log`. Stale PID files are auto-cleaned. Includes crash recovery with exponential backoff.

## Foreground (interactive)

```bash
mercury start --foreground
```

Runs Mercury attached to your terminal with the Ink TUI interface. Press `Ctrl+C` to exit. The CLI supports chat, coding workspace mode, progress views, and interactive permission prompts. Shorthand: `mercury start -f`.

When running in background mode, you can stop it with:

```bash
mercury stop
```

## Verbose logging

Add `--verbose` to any start command to see debug logs on stderr:

```bash
mercury start --verbose
```