- A **Telegram bot token** — create one via [@BotFather](https://t.me/BotFather)
- A **Telegram Supergroup** with **Topics/Forum** enabled
- At least one ACP agent installed (e.g., `claude-agent-acp`)
## Install
```bash
npm install -g @openacp/cli
```
Or from source:
```bash
git clone https://github.com/nicepkg/OpenACP.git
cd OpenACP
pnpm install
pnpm build
```
## First Run — Interactive Setup
```bash
openacp
```
If no config file exists (`~/.openacp/config.json`), the interactive setup wizard starts automatically. After setup, OpenACP starts immediately.
### Step 1: Telegram
The wizard asks for:
1.**Bot token** — paste the token from BotFather. OpenACP validates it by calling the Telegram API (`getMe`). If validation fails, you can re-enter or skip.
2.**Chat ID** — the numeric ID of your supergroup (e.g. `-1001234567890`). OpenACP validates it via `getChat` and checks that Topics are enabled.
**How to get your Chat ID:**
- Add [@raw_data_bot](https://t.me/raw_data_bot) to your group
- Send a message in the group
- The bot replies with the chat info including the ID
**How to set up your Telegram group:**
1. Create a new group in Telegram
2. Convert to Supergroup (Settings → Group Type)
3. Enable Topics (Settings → Topics → Enable)
4. Add your bot as admin with **Manage Topics** permission
### Step 2: Agents
The wizard auto-detects installed agents in your PATH and `node_modules/.bin`:
| Binary | Agent name |
|--------|------------|
| `claude-agent-acp` | claude |
| `claude-code` / `claude` | claude |
| `codex` | codex |
Agents are auto-configured — `claude-agent-acp` is preferred when available.
### Step 3: Workspace
Choose the base directory where OpenACP creates project workspaces.
Default: `~/openacp-workspace`
When you create sessions with named workspaces (e.g. `/new claude my-app`), they go under this directory (`~/openacp-workspace/my-app/`).
Config is saved automatically and OpenACP starts right away.
## Config File
Location: `~/.openacp/config.json` (override with `OPENACP_CONFIG_PATH` env var)
```json
{
"channels": {
"telegram": {
"enabled": true,
"botToken": "123456:ABC-DEF...",
"chatId": -1001234567890,
"notificationTopicId": null,
"assistantTopicId": null
}
},
"agents": {
"claude": {
"command": "claude-agent-acp",
"args": [],
"env": {}
}
},
"defaultAgent": "claude",
"workspace": {
"baseDir": "~/openacp-workspace"
},
"security": {
"allowedUserIds": [],
"maxConcurrentSessions": 5,
"sessionTimeoutMinutes": 60
}
}
```
`notificationTopicId` and `assistantTopicId` are auto-created by OpenACP on first start — you don't need to set them.
Security settings use defaults (all users allowed, 5 concurrent sessions, 60 min timeout). Edit the config file manually to change them.
## Environment Variables
These override config file values (useful for secrets or CI):