SkillAgentSearch skills...

Disunday

Control opencode from Discord. Say goodbye to Sundays—manage your AI coding projects 24/7 through Discord channels.

Install / Use

/learn @code-xhyun/Disunday

README

<div align='center'> <br/> <img src="https://raw.githubusercontent.com/code-xhyun/disunday/main/assets/logo.png" alt="disunday" width="480" /> <br/> <br/> <a href="https://www.npmjs.com/package/disunday"><img src="https://img.shields.io/npm/v/disunday.svg" alt="npm version"></a> <a href="https://www.npmjs.com/package/disunday"><img src="https://img.shields.io/npm/dm/disunday.svg" alt="npm downloads"></a> <a href="https://github.com/code-xhyun/disunday/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/disunday.svg" alt="license"></a> </div>

Disunday is a Discord bot that lets you control OpenCode coding sessions from Discord. Send a message in a Discord channel → an AI agent edits code on your machine.

Using Claude Code? Check out sleep-code - a sibling project that brings the same Discord-controlled coding experience to Claude Code.

Fun fact: This project is being developed using Disunday itself - lying on a couch, controlling OpenCode through Discord on a phone.

Quick Start

npx disunday@latest

The CLI will guide you through:

  1. Creating a Discord bot at discord.com/developers
  2. Enabling required intents (Message Content, Server Members)
  3. Installing the bot to your server
  4. Linking project directories

AI Setup Prompt

Copy this prompt to your AI coding agent (Claude Code, Cursor, OpenCode, etc.):

Set up Disunday Discord bot for me by running `npx disunday@latest`.

The CLI will guide me through Discord bot setup, but help me with:
- Creating a Discord bot at https://discord.com/developers/applications
- Enabling "MESSAGE CONTENT INTENT" and "SERVER MEMBERS INTENT" in Bot settings
- Generating invite URL with Administrator permissions
- Getting the bot token

If any errors occur, help me troubleshoot.

Development Installation

For contributing or development:

git clone https://github.com/code-xhyun/disunday
cd disunday
pnpm install
cd discord && pnpm dev

What is Disunday?

Disunday connects Discord to OpenCode, a coding agent similar to Claude Code. Each Discord channel is linked to a project directory on your machine. When you send a message in that channel, Disunday starts an OpenCode session that can:

  • Read and edit files
  • Run terminal commands
  • Search your codebase

Installation Options

| Method | Description | Recommended For | | ------------------------------------------- | ------------------------ | ------------------------- | | npx disunday | One command install | Most users | | Development Install | git clone + pnpm dev | Contributors | | Auto-Start | Auto-run on login | Always-on personal PC | | Docker | Run in container | 24/7 server, VPS deploy |

Think of it as texting your codebase. You describe what you want, the AI does it.

Keep the CLI running. It's the bridge between Discord and your machine.

Auto-Start on Boot

Run the bot automatically when your computer starts:

./scripts/install-service.sh

macOS: Installs LaunchAgent (starts on login) Linux: Installs systemd user service

Service Commands

macOS:

launchctl start com.disunday.bot   # Start
launchctl stop com.disunday.bot    # Stop
tail -f ~/.disunday/logs/disunday.log  # Logs
./scripts/uninstall-service.sh     # Uninstall

Linux:

systemctl --user start disunday    # Start
systemctl --user stop disunday     # Stop
journalctl --user -u disunday -f   # Logs
./scripts/uninstall-service.sh     # Uninstall

Docker

When to Use Docker?

| Situation | Recommended | | ------------------------------ | -------------------------- | | Developing on my PC | Local install (pnpm dev) | | Run bot only when PC is on | Auto-Start script | | 24/7 server operation | Docker | | Run without Node.js installed | Docker | | VPS/cloud server deployment | Docker |

Quick Start

# Build and run
docker compose up -d

# View logs
docker compose logs -f

# Stop
docker compose down

Volume Mounts

| Path | Description | | ------------- | ------------------------- | | ~/.disunday | Bot credentials, database | | ~/projects | Your project directories |

Edit docker-compose.yml to change mounted directories:

volumes:
  - ~/.disunday:/root/.disunday
  - ~/my-projects:/projects # Change this

Manual Docker Run

docker build -t disunday .

docker run -d \
  --name disunday \
  --restart unless-stopped \
  -v ~/.disunday:/root/.disunday \
  -v ~/projects:/projects \
  disunday

Architecture: One Bot Per Machine

Each Discord bot you create is tied to one machine. This is by design.

When you run disunday on a computer, it spawns OpenCode servers for projects on that machine. The bot can only access directories on the machine where it's running.

To control multiple machines:

  1. Create a separate Discord bot for each machine
  2. Run disunday on each machine with its own bot token
  3. Add all bots to the same Discord server

Each channel shows which bot (machine) it's connected to. You can have channels from different machines in the same server, controlled by different bots.

Running Multiple Instances

By default, Disunday stores its data in ~/.disunday. To run multiple bot instances on the same machine (e.g., for different teams or projects), use the --data-dir option:

# Instance 1 - uses default ~/.disunday
cd discord && pnpm dev

# Instance 2 - separate data directory
cd discord && pnpm dev -- --data-dir ~/work-bot

# Instance 3 - another separate instance
cd discord && pnpm dev -- --data-dir ~/personal-bot

Each instance has its own:

  • Database - Bot credentials, channel mappings, session history
  • Projects directory - Where /create-new-project creates new folders
  • Lock port - Derived from the data directory path, so instances don't conflict

This lets you run completely isolated bots on the same machine, each with their own Discord app and configuration.

Migration from Kimaki

If you previously used Kimaki, Disunday automatically detects existing data at ~/.kimaki on first run and offers to migrate it to ~/.disunday.

What gets migrated:

  • Bot token and credentials
  • Channel-to-directory mappings
  • API keys (Gemini, etc.)

Manual migration (if needed):

cp -r ~/.kimaki ~/.disunday

After migration, your existing Discord channels will continue to work with Disunday.

Multiple Discord Servers

A single Disunday instance can serve multiple Discord servers. Install the bot in each server using the install URL shown during setup, then add project channels to each server.

Method 1: Use /add-project command

  1. Run pnpm dev once to set up the bot
  2. Install the bot in both servers using the install URL
  3. In Server A: run /add-project and select your project
  4. In Server B: run /add-project and select your project

The /add-project command creates channels in whichever server you run it from.

Method 2: Re-run CLI with --add-channels

  1. Run pnpm dev - set up bot, install in both servers, create channels in first server
  2. Run pnpm dev -- --add-channels - select projects for the second server

The setup wizard lets you pick one server at a time.

You can even link the same project to channels in multiple servers - both will point to the same directory on your machine.

Best Practices

Create a dedicated Discord server for your agents. This keeps your coding sessions separate from other servers and gives you full control over permissions.

Add all your bots to that server. One server, multiple machines. Each channel is clearly labeled with its project directory.

Use the "Disunday" role for team access. Create a role named "Disunday" (case-insensitive) and assign it to users who should be able to trigger sessions.

Send long prompts as file attachments. Discord has character limits for messages. Tap the plus icon and use "Send message as file" for longer prompts. Disunday reads file attachments as your message.

Required Permissions

Only users with these Discord permissions can interact with the bot:

  • Server Owner - Full access
  • Administrator - Full access
  • Manage Server - Full access
  • "Disunday" role - Create a role with this name and assign to trusted users

Messages from users without these permissions are ignored.

Blocking Access with "no-disunday" Role

Create a role named "no-disunday" (case-insensitive) to block specific users from using the bot, even if they have other permissions like Server Owner or Administrator.

This implements the "four-eyes principle" - it adds friction to prevent accidental usage. Even if you're a server owner, you must remove this role to interact with the bot.

Use cases:

  • Prevent accidental bot triggers by owners who share servers
  • Temporarily disable access for specific users
  • Break-glass scenario: removing the role is a deliberate action

Features

Text Messages

Send any message in a channel linked to a project. Disunday creates a thread and starts an OpenCode session.

File Attachments

Attach images, code files, or any other files to your message. Disunday includes them in the session context.

Voice Messages

Record a voice message in Discord. Disunday transcribes it using Google's Gemini API and processes it as text. The transcription uses your project's file tree f

View on GitHub
GitHub Stars13
CategoryDevelopment
Updated1mo ago
Forks0

Languages

TypeScript

Security Score

95/100

Audited on Feb 23, 2026

No findings