Headless, JSON-first Discord CLI for AI agents, shell scripts, cron jobs, and CI/CD.
63 commands across 13 groups — manage channels, categories, roles, permissions, members, messages, threads, webhooks, invites, search, and JSON/CSV exports from one command-line binary. No long-running bot daemon. No MCP tool-schema context bloat.
$ discord-cli guild info { "ok": true, "data": { "id": 123456789012345678, "name": "Engineering HQ", "member_count": 42, "channel_count": 18, "role_count": 9, "verification_level": "medium" } } Pipe directly into jq:
# Find the ID of #announcements and post a release message CHANNEL_ID=$(discord-cli channel list | jq -r '.data.channels[] | select(.name == "announcements") | .id') discord-cli message send "$CHANNEL_ID" --content "v1.4.0 deployed to production" Install Package vs. command name: The PyPI distribution is discordcli-agents; the installed executable is discord-cli.
# Using uv (fastest) uv tool install discordcli-agents # Or using pipx pipx install discordcli-agents # Or standard pip pip install discordcli-agents Homebrew (macOS / Linux) brew install 1solomonwakhungu/tap/discordcli-agents Windows (Scoop manual manifest) A CI-synced Scoop manifest is provided in packaging/scoop/ for local/manual installs.
A man page ships with the Python package:
man discord-cli If your virtualenv prefix is not on MANPATH:
man "$(python -c 'import sysconfig; print(sysconfig.get_path("data"))')/share/man/man1/discord-cli.1" Use with AI Agents (Claude Code, Codex, Cursor, Copilot) Install the bundled discord-cli-server-management skill via the open skills CLI:
npx skills add 1solomonwakhungu/discord-cli --skill discord-cli-server-management Once installed (with DISCORD_BOT_TOKEN in your environment or .env), ask your agent things like:
The published skill includes explicit prompt-injection guardrails instructing agents to treat retrieved Discord messages, usernames, topics, and embeds as untrusted data. See docs/ai-agents.md for full integration patterns.
export DISCORD_BOT_TOKEN="your-bot-token-here" # Optional: default server when the bot is in multiple guilds export DISCORD_GUILD_ID="123456789012345678" Verify connectivity:
discord-cli --human guild info Quick start # Inspect server & channels (JSON by default; pass --human before the subcommand for Rich tables) discord-cli guild info discord-cli --human channel list # Create a category and a channel inside it CAT_ID=$(discord-cli category create "Releases" | jq -r '.data.created.id') discord-cli channel create "announcements" --type text --category "$CAT_ID" --topic "Release updates" # Send a plain or embed message discord-cli message send 123456789012345678 --content "Deploy finished!" discord-cli message send 123456789012345678 --embed-json '{"title":"Release v1.4.0","color":5763719}' # Search messages or members (positional query) discord-cli search messages "deployment" --channel-id 123456789012345678 --limit 25 discord-cli search members "alice" # Export channel history to JSON or extract CSV discord-cli export channel 123456789012345678 --limit 500 --format json > history.json discord-cli export channel 123456789012345678 --limit 500 --format csv | jq -r '.data.data' > history.csv # Create a role and assign channel permission overwrites ROLE_ID=$(discord-cli role create "Ops" --color "#3498db" --mentionable --hoist | jq -r '.data.created.id') discord-cli permissions set --channel 123456789012345678 --role "$ROLE_ID" --allow "view_channel,send_messages" # Preview inactive member pruning safely (dry-run defaults to true) discord-cli guild prune --days 30 Command reference (63 commands, 13 groups) Global options (placed before the command group): --token TEXT, --guild INTEGER, --human, --version.
Copy-paste workflows in docs/recipes.md:
Third-party Python packages can register new top-level command groups via the discord_cli.plugins entry-point group. Broken plugins log a warning and never crash built-in commands. See docs/plugins.md and examples/plugin-hello/.
Both files in this release have provenance metadata.
ai-agent cli discord discord-automation discord-bot
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 22, 2026.
Both files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Nov 22, 2026 2 release files Full provenance
Sep 14, 2026 2 release files Full provenance
Aug 26, 2026 2 release files Full provenance
Jul 15, 2026 2 release files Full provenance
Jul 14, 2026 2 release files Full provenance
Jul 13, 2026 2 release files Full provenance




