A lightweight Discord voice control bridge for seamless audio management
- Description
- Architecture
- Supported Commands
- Example Usage
- Prerequisites
- Installation
- Configuration
- Service Management
- Uninstallation
- Troubleshooting
- Contributing
Bridgecord is a background service that enables external applications and scripts to control Discord voice settings through a simple Unix socket interface. Control your Discord mute/deaf status programmatically without touching the Discord interface.
Key Features:
- Mute/Unmute your microphone
- Deafen/Undeafen your audio
- Toggle both settings programmatically
- Runs as a systemd service with automatic Discord OAuth authentication
- Simple Unix socket interface at
/tmp/bridgecord.sock
External App/Script → Unix Socket → Bridgecord → Discord IPC → Discord Client
/tmp/bridgecord.sock discord-ipc-*
Send these commands to /tmp/bridgecord.sock:
mute_on- Mute your microphonemute_off- Unmute your microphonemute_toggle- Toggle mute statusdeaf_on- Deafen audio (also mutes microphone)deaf_off- Undeafen audiodeaf_toggle- Toggle deaf status
# Using the helper command (installed automatically)
bridgecord-cmd mute_toggle
bridgecord-cmd deaf_on
bridgecord-cmd # Show all commands
# Using raw socket communication
echo "mute_on" | socat - UNIX-SENDTO:/tmp/bridgecord.sock- Go 1.24.4+ - For building the application
- Linux - Currently supports Linux systems only
- Discord Application - You need to create a Discord application and get credentials
- systemd - For service management (optional but recommended)
git clone https://github.com/yourusername/bridgecord
cd bridgecord
chmod +x scripts/install.sh
./scripts/install.shThis installs the service, helper command, and handles Discord app setup automatically.
# 1. Get Discord credentials from https://discord.com/developers/applications
export CLIENT_ID="your_client_id"
export CLIENT_SECRET="your_client_secret"
# 2. Build and run
go build -o bridgecord ./cmd/bridgecord/
./bridgecord
# 3. Optional: Install helper script
sudo cp scripts/bridgecord-cmd.sh /usr/local/bin/bridgecord-cmdAutomatic Installation: Credentials are configured during installation. To change them later, either:
- Run the installer script again, or
- Edit
/etc/systemd/system/bridgecord.serviceand restart the service
Manual Installation: Export environment variables as shown in the installation steps above.
sudo systemctl status bridgecord # Check status
sudo journalctl -u bridgecord -f # View logs
sudo systemctl restart bridgecord # Restart serviceTo completely remove Bridgecord from your system:
chmod +x scripts/uninstall.sh
./scripts/uninstall.shThis will:
- Stop and disable the systemd service
- Remove the binary and helper script from
/usr/bin/ - Remove the service file
If you prefer to remove components manually:
# Stop and disable service
sudo systemctl stop bridgecord
sudo systemctl disable bridgecord
# Remove files
sudo rm -f /usr/bin/bridgecord
sudo rm -f /usr/bin/bridgecord-cmd
sudo rm -f /etc/systemd/system/bridgecord.service
# Reload systemd
sudo systemctl daemon-reload
# Remove socket (if present)
rm -f /tmp/bridgecord.sock- Token Storage: Discord OAuth tokens are securely stored in the system keyring
- User Isolation: The service runs under your user account, not as root
- Minimal Permissions: Only requires Discord voice settings permissions
bridgecord/
├── cmd/bridgecord/ # Main application entry point
├── internal/
│ ├── auth/ # OAuth token management
│ ├── bridge/ # Unix socket command server
│ └── discord/ # Discord IPC client
├── scripts/
│ ├── dev.sh # Development script for running locally
│ ├── install.sh # Installation script
│ ├── uninstall.sh # Uninstallation script
│ └── bridgecord-cmd.sh # Helper script for sending commands
└── README.md
Service issues: sudo journalctl -u bridgecord -f
Discord connection: Ensure Discord is running and logged in
Socket access: Check /tmp/bridgecord.sock exists
Permissions: Service should run as your user, not root
Contributions welcome! Submit issues and pull requests on GitHub.
