Back to blog

How to set up OpenCode in Slack with Pipa

Step-by-step OpenCode Slack setup with the free, open-source Pipa CLI, from installation through your first trusted-channel request.

Posted by

This walkthrough shows how I set up Pipa to reach the OpenCode running on my computer from Slack, so I can give it work and continue the conversation from a channel.

Pipa Local is a free, open-source bridge. It uses your existing OpenCode setup and works inside the folder you choose. This tutorial walks through the complete setup in under four minutes.

Ready to connect OpenCode and Slack?

Need the integration overview first? Start on the OpenCode Slack install page for the shortest setup path, examples, and FAQ.

Prefer YouTube? Watch the OpenCode Slack tutorial here.

The short version

npm install --global @usepipa/pipa
pipa init
pipa start

Run pipa init inside the folder you want OpenCode to access, follow the Slack setup wizard, then keep pipa start running.

What you need

  • Node.js 22 or newer.
  • OpenCode v1 installed and authenticated.
  • A Slack workspace where you can create and install an app.
  • A folder containing only the files OpenCode should be able to reach.

You can check the current requirements on the Pipa Local install page.

1. Install the Pipa CLI

Install Pipa globally from your terminal:

npm install --global @usepipa/pipa

This gives you the pipa command used for setup and for starting the Slack bridge.

2. Choose OpenCode's working folder

Move into the folder where you want the Slack agent to start, then run the setup wizard:

cd /path/to/your/folder
pipa init

I use a container folder called studio for the projects where I want my agent to work. You can use one project folder instead to give it more focused context.

Set explicit Slack allow lists during setup

During pipa init, choose which Slack users and channels can use Pipa. Pipa handles a message only when both the user and channel are allowed. An empty user or channel list allows anyone or any channel, so configure both lists for shared workspaces. The working folder sets OpenCode's starting context, while Pipa inherits the configuration and permissions from your OpenCode setup.

3. Follow the Slack setup wizard

The wizard asks you to name your bot, confirm its working folder, and choose the Slack users and channels you want to allow. It then opens Slack so you can choose a workspace and create the app from a generated manifest.

Slack requires two tokens:

  1. An app-level token with the connections:write scope.
  2. A bot user OAuth token created after you install the app in your workspace.

Paste each token into the wizard when it asks. Keep both tokens secret. Pipa saves the configuration on your computer.

4. Start the OpenCode Slack bridge

Once setup is complete, start Pipa:

pipa start

Keep this process and your computer running while you use OpenCode from Slack. Pipa Local is not a hosted service, so the connection stops when the process or computer stops.

5. Invite the bot and test it

Open a channel you allowed during setup, invite the bot, and mention it from an allowed Slack account with a small request. I start with a simple message to confirm that the connection works before asking it to read or change anything.

@your-agent Hey there, how are you doing?

The OpenCode configuration and skills available in that local instance are now available through Slack, starting from the working folder you selected.

What Pipa Local does

  • Connects Slack to the OpenCode installation on your computer.
  • Uses the OpenCode configuration and skills you already have.
  • Gives you control over the folder, channels, tokens, compute, and uptime.

It does not turn your computer into a hosted, always-on autonomous agent. If you stop Pipa or close the computer, it goes offline.

Run OpenCode from Slack

If you already use OpenCode and want to reach it from Slack, choose the users and channels you want to allow, then choose its working folder. You can install Pipa Local for free or inspect the source in the Pipa GitHub repository.

How to Set Up OpenCode in Slack | Pipa