discord-cli knowledge
Local-first Discord sync, search, export, and analytics via SQLite
discord is a CLI that syncs Discord messages into a local SQLite database. Search, analyze, and export your Discord conversations — all locally and offline-capable.
Features
- Sync messages from all accessible text channels into local SQLite
- Full-text search with channel, sender, and time filters
- View recent messages, today’s activity, and timeline analytics
- Export messages in text or JSON format
- Automatic discovery of servers and channels
- Structured output (JSON/YAML) for AI agent integration
- Browser-based token extraction for authentication
Install
uv: uv tool install kabi-discord-clipipx: pipx install kabi-discord-cli Commands
| Command | Syntax | Description |
|---|---|---|
auth | discord auth --save | Extract and store token from browser session |
guilds | discord dc guilds | List joined servers |
sync-all | discord dc sync-all -n 500 | Bootstrap database with message history |
search | discord search <keyword> -c <channel> | Full-text search across synced messages |
recent | discord recent -n 50 | View latest messages |
today | discord today | View today's messages |
export | discord export <channel> -f json -o file.json | Export messages to file |
Links
Agent Usage Example
Use cases:
- Search Discord conversations by keyword and channel
- Analyze messaging activity and timeline patterns
- Export chat history for archival or reporting
Example workflow:
discord dc sync-all -n 200 && discord search 'bug report' --json