PyPI package name:
kabi-discord-cli— install withuv tool install kabi-discord-cli
Telethon-style local-first tooling for Discord: sync messages into SQLite, search them from the terminal, export structured results, and feed them to AI agents.
discord-cli uses the Discord HTTP API with a user token from your local session. It is meant for accounts you control, on machines you control.
discord dc sync-all discovers accessible text channels and bootstraps from the API--yaml and --json for scripting and AI agent integrationOUTPUT=yaml|json|rich|autoAI Agent Tip: Prefer
--yamlfor structured output unless a strict JSON parser is required. Use-nto limit results.
search, recent, today, export, and purge# PyPI
uv tool install kabi-discord-cli
# or
pipx install kabi-discord-cli
# From GitHub
uv tool install git+https://github.com/jackwener/discord-cli.git
# From source
git clone git@github.com:jackwener/discord-cli.git
cd discord-cli
uv sync --extra dev
Upgrade to the latest version:
uv tool upgrade kabi-discord-cli
# Or: pipx upgrade kabi-discord-cli
Tip: Upgrade regularly to avoid unexpected errors from outdated API handling.
# Extract and save a token from your local Discord/browser session
discord auth --save
# Verify auth
discord status
discord whoami
# Explore guilds and channels
discord dc guilds
discord dc channels <guild_id>
# Bootstrap local storage
discord dc sync-all -n 500
# Query local cache
discord today
discord recent -n 50
discord search "rust" -c general --json
discord timeline --by hour --json
| Command | Description |
|---|---|
auth [--save] | Extract a token from local Discord/browser session |
status | Check if the configured token is valid |
whoami [--json] | Show the current Discord profile |
discord dc ...)| Command | Description |
|---|---|
dc guilds [--json] | List joined guilds |
dc channels GUILD [--json] | List text channels in a guild |
dc history CHANNEL [-n 1000] | Fetch message history for one channel |
dc sync CHANNEL [-n 5000] | Incrementally sync one channel |
dc sync-all [-n 5000] | Discover and sync accessible text channels |
dc tail CHANNEL [--once] | Poll and follow new messages like tail -f |
dc search GUILD KEYWORD [-c CHANNEL_ID] [--json] | Use Discord native search |
dc members GUILD [--max 50] [--json] | List guild members |
dc info GUILD [--json] | Show guild info |
| Command | Description |
|---|---|
search KEYWORD [-c CHANNEL] [-n 50] [--json] | Search locally stored messages |
recent [-c CHANNEL] [--hours N] [-n 50] [--json] | Show newest locally stored messages |
stats [--json] | Message statistics per channel |
today [-c CHANNEL] [--json] | Show today's messages |
top [-c CHANNEL] [--hours N] [--json] | Top senders |
timeline [-c CHANNEL] [--hours N] [--by day|hour] [--json] | Activity timeline |
| Command | Description |
|---|---|
export CHANNEL [-f text|json] [-o FILE] [--hours N] | Export stored messages |
purge CHANNEL [-y] | Delete stored messages for a channel |
discord dc sync-all now bootstraps by discovering guilds and channels through the API, so it works on a fresh database.discord-cli also ships with SKILL.md for agent integration.
uv sync --extra dev
uv run ruff check .
uv run python -m pytest
uv build
Apache-2.0
40 commits
Python
100.0%
PyPI package name:
kabi-discord-cli— install withuv tool install kabi-discord-cli
Telethon-style local-first tooling for Discord: sync messages into SQLite, search them from the terminal, export structured results, and feed them to AI agents.
discord-cli uses the Discord HTTP API with a user token from your local session. It is meant for accounts you control, on machines you control.
discord dc sync-all discovers accessible text channels and bootstraps from the API--yaml and --json for scripting and AI agent integrationOUTPUT=yaml|json|rich|autoAI Agent Tip: Prefer
--yamlfor structured output unless a strict JSON parser is required. Use-nto limit results.
search, recent, today, export, and purge# PyPI
uv tool install kabi-discord-cli
# or
pipx install kabi-discord-cli
# From GitHub
uv tool install git+https://github.com/jackwener/discord-cli.git
# From source
git clone git@github.com:jackwener/discord-cli.git
cd discord-cli
uv sync --extra dev
Upgrade to the latest version:
uv tool upgrade kabi-discord-cli
# Or: pipx upgrade kabi-discord-cli
Tip: Upgrade regularly to avoid unexpected errors from outdated API handling.
# Extract and save a token from your local Discord/browser session
discord auth --save
# Verify auth
discord status
discord whoami
# Explore guilds and channels
discord dc guilds
discord dc channels <guild_id>
# Bootstrap local storage
discord dc sync-all -n 500
# Query local cache
discord today
discord recent -n 50
discord search "rust" -c general --json
discord timeline --by hour --json
| Command | Description |
|---|---|
auth [--save] | Extract a token from local Discord/browser session |
status | Check if the configured token is valid |
whoami [--json] | Show the current Discord profile |
discord dc ...)| Command | Description |
|---|---|
dc guilds [--json] | List joined guilds |
dc channels GUILD [--json] | List text channels in a guild |
dc history CHANNEL [-n 1000] | Fetch message history for one channel |
dc sync CHANNEL [-n 5000] | Incrementally sync one channel |
dc sync-all [-n 5000] | Discover and sync accessible text channels |
dc tail CHANNEL [--once] | Poll and follow new messages like tail -f |
dc search GUILD KEYWORD [-c CHANNEL_ID] [--json] | Use Discord native search |
dc members GUILD [--max 50] [--json] | List guild members |
dc info GUILD [--json] | Show guild info |
| Command | Description |
|---|---|
search KEYWORD [-c CHANNEL] [-n 50] [--json] | Search locally stored messages |
recent [-c CHANNEL] [--hours N] [-n 50] [--json] | Show newest locally stored messages |
stats [--json] | Message statistics per channel |
today [-c CHANNEL] [--json] | Show today's messages |
top [-c CHANNEL] [--hours N] [--json] | Top senders |
timeline [-c CHANNEL] [--hours N] [--by day|hour] [--json] | Activity timeline |
| Command | Description |
|---|---|
export CHANNEL [-f text|json] [-o FILE] [--hours N] | Export stored messages |
purge CHANNEL [-y] | Delete stored messages for a channel |
discord dc sync-all now bootstraps by discovering guilds and channels through the API, so it works on a fresh database.discord-cli also ships with SKILL.md for agent integration.
uv sync --extra dev
uv run ruff check .
uv run python -m pytest
uv build
Apache-2.0
40 commits
Python
100.0%