Skip to main content
At the end of this page the Ravi daemon runs under PM2, the main agent answers you in the terminal with the provider you chose, and everything comes back after a reboot.

Before you start

You need a macOS or Linux machine with:
  • Bun 1.0 or newer, with ~/.bun/bin on your PATH. Install it from bun.sh, then open a new shell. Ravi runs on Bun, and the setup wizard installs global tools with bun add -g, which puts them in ~/.bun/bin.
  • Node.js 18 or newer. Ravi runs its processes under PM2, and PM2 requires Node.js 18 or newer.
  • A model credential. For Claude: a Claude Code OAuth token (sk-ant-oat01-..., printed by claude setup-token in Claude Code) or an Anthropic API key. For Codex: the codex CLI on your PATH.
  • PostgreSQL for Omni. Ravi needs a NATS server with JetStream, and ravi setup gets one by installing Omni, which also bridges WhatsApp. Omni keeps its data in PostgreSQL. By default omni install uses an embedded server (pgserve, installed by autopg); when that is not on your PATH, it falls back to postgresql://postgres:postgres@localhost:5432/omni. Either install autopg with the command Omni suggests, or have PostgreSQL reachable at that URL:
  • Free ports 4222 (NATS) and 8882 (Omni API).
Only using Slack? You can skip Omni and PostgreSQL. See Run without Omni at the end of this page.
These docs follow the next release channel (ravi.bot@next). The latest channel is older and lacks Bases, the one-command ravi pages ship, the explicit-only permission profile and governed chats.

Install

1

Install the CLI

If Ravi is already installed, ravi update --next moves it to the next channel. On a host that already runs Ravi, always update with ravi update, never with bun add -g: ravi update stops and starts the daemon and the channel runner on the new release. On a global install whose daemon wrote a boot record (3.261104.2 on), it also keeps a snapshot of the state and rolls back on its own when the new release does not come up; a source checkout or an older release has neither. ravi update --rollback shows how to go back to the release before the last update, with its state; add --execute to do it.
2

Run the setup wizard

The wizard asks its questions in Portuguese and runs five steps:The wizard prints “Configuração completa!” even when an Omni or PM2 step ended in a warning, so read any warning lines above it. If the daemon did not prepare its state, the wizard skips steps 4 and 5 and prints “Configuração incompleta” instead: the usual cause is that nats-server is not running, because the daemon is ready only after it connects to it. Check that, read ravi daemon logs and, once it shows Daemon ready, run ravi setup again. Its final hint, ravi agents chat main, is not a real command. Use the commands in Talk to your agent instead.
3

Create the agent's instructions file

This creates ~/ravi/main/AGENTS.md, a stub you edit to tell the agent who it is and how to work, plus a CLAUDE.md bridge that points to it.

Choose the model provider

The built-in default provider is codex, but the wizard collects a Claude credential. Until you change it, ravi agents show main prints Provider: codex (runtime_default) and the Claude credential goes unused. We recommend Claude.

Check that it runs

ravi daemon status should list ravi, omni-nats and omni-api as online. ravi agents show main should show Provider: claude (agent_default), or codex if you chose Codex. ravi doctor inspects the whole install. On a new install it reports errors for parts you have not set up yet:
The daemon looks for Omni only when it starts. If you install or fix Omni after the daemon is running (for example, after setting up PostgreSQL), run ravi daemon restart -m "omni ready" and check that ravi daemon logs shows Omni connection resolved.

Talk to your agent

This creates a session named main for the agent main, sends the prompt and waits for the reply. -a main is required the first time, because the session does not exist yet. Turns you start from the terminal run with the agent’s whole permission ceiling, and nothing in them can ask for approval. The next page explains the ceiling and how to raise it.

Keep it running after a reboot

PM2 restarts Ravi’s processes if they crash. To start them again after a reboot:
Run pm2 save again whenever PM2 gets a new process, for example after ravi channels start when you connect Slack.

Update

This installs the newest next build, remembers the channel, and reconciles the managed daemon and channel runner with the updated bundle. Every managed process that was online is restarted; stopped processes are not started. Restart is a required part of ravi update: there is no --no-restart bypass. Native channel intake is interrupted while the runner restarts. Once you have run it with --next, a plain ravi update stays on next. Before that, a plain ravi update installs latest. ravi update --stable switches to latest, and --version <version> installs one exact release. After a manual package install, inspect ravi daemon status --json and ravi channels status --json; the installed version alone does not prove what either process is running.

Run without Omni (Slack only)

Ravi only needs a NATS server with JetStream at NATS_URL (default nats://127.0.0.1:4222). Omni is one way to get it. If you will only use Slack, you can run NATS yourself and skip Omni and PostgreSQL. This is an advanced path.ravi setup always tries to install Omni, whose omni-nats would compete for port 4222, so run these commands in place of the wizard (step 2 above):
The daemon comes first because it is what creates the state database; ravi settings set before it fails with STATE_SCHEMA_NOT_READY. On a new machine ravi daemon start returns once the daemon has prepared its state, so the next command can use it. If the daemon does not get ready within 45 seconds, the command warns on stderr and still exits 0. The usual cause is that nats-server is not running: check your nats process with pm2 ls, read ravi daemon logs, and wait for Daemon ready before ravi settings set.Then continue with step 3 and Choose the model provider. -js turns on JetStream, which Ravi requires.The daemon logs Omni not configured and Creating gateway without omni. Slack does not go through Omni, so you can ignore both. ravi daemon status shows omni-nats and omni-api as not managed by PM2; use pm2 ls to see your nats process.If NATS runs on another host or port, add NATS_URL=nats://<host>:<port> to ~/.ravi/.env (or open it with ravi daemon env) and run ravi daemon restart -m "nats url".

Next

Make yourself the owner

Set the agent’s permission ceiling and make your own contact the one that can do everything and approve requests.