pip install mailcode
Turn your email inbox into a remote control for AI coding agents. MailCode bridges OpenCode and Claude Code — send tasks, receive results, and inject commands, all through any email account. Zero third-party dependencies.
Built for developers who need to stay in control of their AI agents, from anywhere.
Cron-based email scheduling for recurring automation — nightly backups, daily reports, automated code reviews.
Slack, Discord, Feishu, DingTalk, WeCom, Bark (iOS) — choose your channel. Custom webhooks supported.
Full terminal UI (Textual) with 8 screens: dashboard, sessions, scheduler, channels, config, health, logs, license.
DKIM/SPF authentication, sender whitelist, command blacklist, 128-bit session keys, auto-expiring sessions.
Reply Mode for active sessions + Cold Start to launch agents remotely. Covers every scenario.
Gmail, Outlook, QQMail, 126Mail — IMAP IDLE long connection for instant command delivery.
MailCode creates a simple bridge between your email inbox and AI agents running in tmux.
A coding task or command, sent from any email client — phone, tablet, or laptop.
MailCode polls your inbox in real time via IMAP IDLE, detecting new messages instantly.
Commands are injected into your running AI agent's tmux session via send-keys.
Task completes? You receive an email or webhook notification. Reply to continue the loop.
Whether your AI agent is already running or not, MailCode has you covered.
The bridge plugin detects idle state and sends you an email notification with a unique token. Simply reply with your next instruction — the token routes your command to the right session.
Send a new email with your session key and task description. MailCode creates a new tmux session, launches the agent, and injects your command. You receive a confirmation with the new token.
Configure SMTP and IMAP for your preferred email service.
Developers use MailCode to stay connected to their codebase no matter where they are.
Send emails from your phone to trigger AI coding tasks while commuting or away from your desk. Review results and iterate — all from your pocket.
Configure cron-like email triggers for nightly backups, dependency updates, or automated refactoring — without keeping a laptop open.
Production issue while traveling? Send an email with the hotfix command. MailCode cold-starts your agent, applies the patch, and confirms the result.
Start free. Upgrade when you need more power.
Requires Python 3.9+, tmux, and an AI agent CLI. Choose your platform.
pip install mailcode
mailcode serve --idle
After installation, run mailcode config init to configure your email credentials, then start the relay with mailcode serve --idle.
apt update && apt install python3 tmux -y
pip install mailcode
mailcode serve --idle
After installation, run mailcode config init to configure your email credentials, then start the relay with mailcode serve --idle.
dnf install python3 tmux -y
pip install mailcode
mailcode serve --idle
After installation, run mailcode config init to configure your email credentials, then start the relay with mailcode serve --idle.
pacman -S python tmux --noconfirm
pip install mailcode
mailcode serve --idle
After installation, run mailcode config init to configure your email credentials, then start the relay with mailcode serve --idle.
Install MailCode in one command and bridge your email to AI in minutes. Free to start, no credit card required.