---
title: "OpenCode Router"
description: "What opencode-router is and when to use it"
---

`opencode-router` is a Slack + Telegram bridge and directory router for a running OpenCode/OpenWork instance.

## What it does

- Routes messages using `(channel, identity, peer) -> directory` bindings.
- Lets teams interact with workers from Slack or Telegram.
- Keeps chat surfaces mapped to the correct workspace.
- Handles text, files, images, and audio as first-class message parts.

## Quick start

```bash
npm install -g opencode-router
opencode-router
```

Or from monorepo:

```bash
pnpm -C apps/opencode-router setup
opencode-router start
```

## Required config

- `OPENCODE_URL`
- `OPENCODE_DIRECTORY`

## Common commands

```bash
opencode-router status
opencode-router telegram list
opencode-router slack list
opencode-router bindings list
opencode-router bindings set --channel telegram --identity default --peer <chatId> --dir /path/to/workdir
opencode-router send --channel slack --identity default --to D123 --file ./report.pdf
```

## In OpenWork UI

Open **Identities** to configure bot identities and directory bindings per worker.
