Discord REST CLI for coding agents: read guilds, channels and messages, send messages, and call raw routes with a bot token. Built on gaato/discord.
moonx gaato/discord-cli --helpmoonx gaato/discord-cli me
moonx gaato/discord-cli guilds
moonx gaato/discord-cli channels 123456789012345678
moonx gaato/discord-cli messages 234567890123456789 --limit 10
moonx gaato/discord-cli send 234567890123456789 'Hello'
moonx gaato/discord-cli api GET /users/@meprintf '%s\n' 'Build complete.' | moonx gaato/discord-cli send 234567890123456789 --stdin --reply-to 345678901234567890| Option | Applies to | Meaning |
|---|---|---|
| --token TOKEN | All commands | Overrides DISCORD_TOKEN. Prefer the environment, so the token does not appear in process listings. |
| --help, -h | All commands | Usage text |
| --version | Root | Version text |
| --limit N, -n N | messages CHANNEL_ID | Default 50. Larger limits are paginated. |
| --before ID / --after ID | messages CHANNEL_ID | Exclusive cursors. Use one or the other. |
| --stdin | send CHANNEL_ID [text...] | Read the message from standard input (UTF-8) instead of the arguments |
| --reply-to ID | send CHANNEL_ID [text...] | Reply to a message |
| --body JSON, -d JSON | api METHOD PATH | JSON body. The path is relative to /api/v10. |
| Exit code | Meaning |
|---|---|
| 0 | Success, or help |
| 1 | A Discord API, network or other runtime failure |
| 2 | Invalid arguments, a missing token, or an empty message |
{
"env": { "from_host": ["DISCORD_TOKEN"] },
"net": { "connect": ["discord.com:443"] }
}moonx --experimental-policy discord-policy.json gaato/discord-cli meInstall
Download zipDiscord REST CLI for coding agents: read guilds, channels and messages, send messages, and call raw routes with a bot token. Built on gaato/discord.