Skip to content

Installation

One-Line Install

curl -fsSL https://raw.githubusercontent.com/xvirobotics/metabot/main/install.sh | bash
irm https://raw.githubusercontent.com/xvirobotics/metabot/main/install.ps1 | iex

The installer walks you through: working directory → Claude auth → IM credentials → auto-start with PM2.

Update

Already installed? One command to pull, rebuild, and restart:

metabot update

Manual Install

git clone https://github.com/xvirobotics/metabot.git
cd metabot && npm install
cp bots.example.json bots.json   # edit with your bot configs
cp .env.example .env              # edit global settings
npm run dev

Prerequisites

  1. Node.js 20+ is installed.
  2. Claude Code CLI is installed and authenticated — The Agent SDK spawns claude as a subprocess; it must be able to run independently.

    • Install: npm install -g @anthropic-ai/claude-code
    • Authenticate (one of):
      • OAuth login (recommended): Run claude login in a standalone terminal and complete the browser flow.
      • API Key: Set ANTHROPIC_API_KEY=sk-ant-... in .env or your shell environment.
    • Verify: Run claude --version and claude "hello" in a standalone terminal to confirm it works.

    Warning

    You cannot run claude login or claude auth status from inside a Claude Code session (nested sessions are blocked). Always use a separate terminal.

  3. IM platform configured — See Quick Setup or Feishu App Setup.

Windows Notes

The PowerShell installer auto-detects winget/choco/scoop for Node.js installation. CLI tools (mm, mb, metabot, fd) are installed with .cmd wrappers and require Git for Windows (provides Git Bash).