Install
openclaw skills install discord-cliDiscord CLI with YAML-first structured output for AI agents — fetch chat history, search messages, sync channels, and AI analysis
openclaw skills install discord-cliCLI tool for Discord — fetch chat history, search messages, sync channels, AI analysis.
When you need machine-readable output:
--yaml for structured output unless a strict JSON parser is required.-n to keep result sets small and token-efficient.-o <file> with export to save large datasets to a file.discord search "keyword" -c general --yaml instead of scanning all channels.OUTPUT=yaml|json|rich|auto to override.# Install
uv tool install kabi-discord-cli
# Or: pipx install kabi-discord-cli
discord auth --saveANTHROPIC_API_KEY env vardiscord auth --save # Auto-extract & save token
discord status # Check token validity (exit 0 = valid)
discord status --yaml # Structured auth status
discord whoami # User profile
discord whoami --yaml # Structured profile
discord dc guilds # List servers
discord dc guilds --yaml # YAML output
discord dc channels <GUILD> # List text channels
discord dc info <GUILD> # Server details
discord dc members <GUILD> # List members
discord dc history <CHANNEL_ID> -n 1000 # Fetch history
discord dc sync <CHANNEL_ID> # Incremental sync
discord dc sync-all # Sync all known channels
discord dc tail <CHANNEL_ID> -n 20 # Follow new messages live
discord dc search <GUILD> "keyword" # Native Discord search
discord search "keyword" # Search local DB
discord search "keyword" -c general # Filter by channel
discord stats # Per-channel stats
discord today # Today's messages
discord today -c general --yaml # Filter + YAML
discord top # Most active senders
discord top --hours 24 # Last 24h only
discord timeline # Activity chart
discord timeline --by hour # Hourly granularity
discord export <CHANNEL> -f json -o out.json # Export
discord purge <CHANNEL> -y # Delete stored
discord analyze <CHANNEL> --hours 24 # AI analysis
discord summary # AI summary of today
discord summary --hours 48 # Last 48h summary
# 1. First time: fetch history for channels you care about
discord dc guilds --yaml
discord dc channels <guild_id> --yaml
discord dc history <channel_id> -n 2000
# 2. Daily: incremental sync
discord dc sync-all
# 3. Read today's messages (structured output for agents)
discord today --yaml
# 4. AI summary
discord summary
~/Library/Application Support/discord-cli/messages.dbANTHROPIC_API_KEY env vardiscord auth --save over manual token input.