| name | discord-cli |
| description | Discord CLI with YAML-first structured output for AI agents — fetch chat history, search messages, sync channels, and AI analysis |
| author | jackwener |
| version | 0.2.8 |
| tags | ["discord","chat","sync","ai-analysis","cli"] |
discord-cli Skill
CLI tool for Discord — fetch chat history, search messages, sync channels, AI analysis.
Agent Defaults
When you need machine-readable output:
- Prefer
--yaml for structured output unless a strict JSON parser is required.
- Use
-n to keep result sets small and token-efficient.
- Use
-o <file> with export to save large datasets to a file.
- Prefer specific queries over broad ones. Example: use
discord search "keyword" -c general --yaml instead of scanning all channels.
- Non-TTY stdout defaults to YAML automatically. Use
OUTPUT=yaml|json|rich|auto to override.
- All machine-readable output uses the envelope documented in SCHEMA.md.
Prerequisites
uv tool install kabi-discord-cli
uv tool upgrade kabi-discord-cli
- Token configured via
discord auth --save
Commands
Auth & Account
discord auth --save
discord status
discord status --yaml
discord whoami
discord whoami --yaml
Servers & Channels
discord dc guilds
discord dc guilds --yaml
discord dc channels <GUILD>
discord dc info <GUILD>
discord dc members <GUILD>
Fetching Messages
discord dc history <CHANNEL_ID> -n 1000
discord dc sync <CHANNEL_ID>
discord dc sync-all
discord dc tail <CHANNEL_ID> -n 20
discord dc search <GUILD> "keyword"
Querying Stored Messages
discord search "keyword"
discord search "keyword" -c general
discord stats
discord today
discord today -c general --yaml
discord top
discord top --hours 24
discord timeline
discord timeline --by hour
Data
discord export <CHANNEL> -f json -o out.json
discord purge <CHANNEL> -y
Workflow: Before Using
discord auth --save
discord status
Workflow: Daily Sync
discord dc guilds --yaml
discord dc channels <guild_id> --yaml
discord dc history <channel_id> -n 2000
discord dc sync-all
discord today --yaml
Notes
- Uses Discord user token (not bot token) for read-only access
- Rate limits are handled automatically with retry
- Messages stored in SQLite at
~/Library/Application Support/discord-cli/messages.db
Safety Notes
- Do not ask users to share raw token values in chat logs.
- Prefer auto-extraction via
discord auth --save over manual token input.
- Token is stored locally and never uploaded.