Discord CLI for
AI agents & humans
Build autonomous Discord bots, automate servers, and deploy AI agents — all from your terminal. One binary. Any language. Zero boilerplate.
pip install discord-cli-agent CLI-First
Every Discord action is a single command. Pipe into jq, chain with &&, run from cron. Built for the terminal.
Agent-Ready
Persistent JSONL over stdin/stdout. Your AI agent receives Discord events and sends actions in real-time, in any language.
Secure by Default
Permission profiles restrict what agents can do. Audit logs track every action. Rate limiting prevents abuse.
The JSONL protocol
discli serve opens a persistent connection. Events flow out on stdout. Actions flow in on stdin. Pure JSON lines.
Events
Messages, reactions, member joins, slash commands — every Discord event arrives as a JSON line on stdout.
{"event":"message","author":"alice"} {"event":"reaction_add","emoji":"thumbsup"} {"event":"member_join","user":"bob"}Actions
Send messages, assign roles, create threads, stream responses — write a JSON line to stdin.
→ {"action":"reply","content":"Hi!"} → {"action":"role_assign","role":"mod"} → {"action":"thread_create","name":"..."}From zero to agent in 15 lines
import json, subprocess proc = subprocess.Popen( ["discli", "--json", "serve"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True, ) for line in proc.stdout: event = json.loads(line) if event.get("event") == "message" and not event.get("is_bot"): cmd = json.dumps({ "action": "reply", "channel_id": event["channel_id"], "message_id": event["message_id"], "content": f"You said: {event['content']}", }) proc.stdin.write(cmd + "\n") proc.stdin.flush()
What will you build?
AI Support Agent
Answer questions autonomously with Claude, GPT, or any model.
02Moderation Bot
Auto-detect spam, warn users, kick repeat offenders.
03Thread Support
Create threads per request, manage async conversations.
04Channel Logger
Stream events to JSONL files. One-liner setup.
05CI Notifications
Build status and deploy alerts from GitHub Actions.
+Your Idea
The protocol is open. Build whatever you imagine.
Start simple. Scale up when ready.
Reactive Bot
Respond to keywords with fixed replies.
Context-Aware
Fetch message history before responding.
Proactive Agent
Create threads, stream responses, detect intent.
Multi-Action
Assign roles, DMs, reactions, channels.
Full Autonomous
Permission-bounded, audit-logged, production-ready.