한국어 | English
Display your current OpenCode session status in Discord Rich Presence. Show which AI agent you're using, the current model, session time, and more.
- Real-time agent display - Shows which AI agent (Claude, Prometheus, etc.) you're currently using
- Model information - Displays the active model (Claude Sonnet, GPT-4, etc.)
- Session time tracking - Shows how long you've been coding
- Korean language support - Proper Korean particle handling (을/를, 은/는)
- Idle detection - Automatically shows when you're taking a break
# Using bun
bun add opencode-discord-presence
# Using npm
npm install opencode-discord-presence
# Using pnpm
pnpm add opencode-discord-presenceAdd the plugin to your opencode.json:
{
"plugins": ["opencode-discord-presence"]
}That's it! The plugin will automatically connect to Discord and display your session status.
Create a .discord-presence.json file in your home directory or project root:
{
"enabled": true,
"applicationId": "YOUR_DISCORD_APP_ID",
"language": "ko"
}Or use environment variables:
OPENCODE_DISCORD_ENABLED=true
OPENCODE_DISCORD_CLIENT_ID=YOUR_APP_ID
OPENCODE_DISCORD_LANGUAGE=ko| Option | Type | Default | Description |
|---|---|---|---|
enabled |
boolean |
true |
Enable or disable the plugin |
applicationId |
string |
(built-in) | Custom Discord Application ID for your own branding |
language |
string |
"en" |
Display language ("en" or "ko") |
- Project directory:
.discord-presence.json - Home directory:
~/.discord-presence.json - Environment variables
For custom branding (your own images and app name):
- Go to Discord Developer Portal
- Click "New Application" and give it a name
- Go to "Rich Presence" → "Art Assets"
- Upload your images (at least one named
opencode-logo) - Copy the Application ID from "General Information"
- Add it to your config:
{
"discordPresence": {
"applicationId": "YOUR_APPLICATION_ID"
}
}The plugin hooks into OpenCode's event system:
- chat.message - Updates presence when you send/receive messages, tracking the current agent and model
- event - Listens for session state changes (idle, active)
| State | English | Korean | Description |
|---|---|---|---|
| Active | "Working with Prometheus" | "Prometheus를 갈구는중" | You're actively coding with an agent |
| Idle | "Prometheus is idle" | "Prometheus는 휴식중" | Session is idle |
Korean particles (을/를, 은/는) are automatically selected based on whether the agent name ends with a consonant (받침).
# Install dependencies
bun install
# Run tests
bun test
# Run tests in watch mode
bun test --watch
# Type check
bun run typecheck
# Lint
bun run lint
# Format
bun run format
# Build
bun run buildsrc/
├── index.ts # Main entry point & exports
├── plugin.ts # Core plugin implementation
├── config.ts # Configuration management
├── types/
│ └── index.ts # TypeScript type definitions
├── services/
│ └── discord-rpc.ts # Discord RPC service (singleton)
└── utils/
└── particle.ts # Korean particle handling (을/를, 은/는)
Contributions are welcome! Please read our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Run tests (
bun test) - Commit your changes (
git commit -m 'feat: add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
MIT License - see LICENSE for details.
- OpenCode - The AI coding assistant this plugin extends
- @xhayper/discord-rpc - Discord RPC library used by this plugin
See CHANGELOG.md for release history.