Skip to content

Commit c49e9fa

Browse files
authored
Merge pull request #22 from DevRohit06/dev
release: voice, interactive, doctor (v0.9.0)
2 parents 2b5d407 + 3dbe338 commit c49e9fa

39 files changed

Lines changed: 11293 additions & 567 deletions

.github/workflows/release.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,30 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020

21-
- uses: actions/setup-python@v5
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v6
2223
with:
23-
python-version: ${{ matrix.python-version }}
24+
enable-cache: true
2425

2526
- name: Install dependencies
26-
run: pip install -e ".[dev]"
27+
run: uv sync --dev --python ${{ matrix.python-version }}
2728

2829
- name: Run tests
29-
run: pytest tests/ -v
30+
run: uv run pytest tests/ -v
3031

3132
build:
3233
needs: test
3334
runs-on: ubuntu-latest
3435
steps:
3536
- uses: actions/checkout@v4
3637

37-
- uses: actions/setup-python@v5
38+
- name: Install uv
39+
uses: astral-sh/setup-uv@v6
3840
with:
39-
python-version: "3.13"
40-
41-
- name: Install build tools
42-
run: pip install build
41+
enable-cache: true
4342

4443
- name: Build package
45-
run: python -m build
44+
run: uv build
4645

4746
- uses: actions/upload-artifact@v4
4847
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ build/
99
docs/dist/
1010
docs/.astro/
1111
docs/node_modules/
12+
.claude/

CLAUDE.md

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,30 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
discli is a Discord CLI for AI agents and humans — a Python command-line tool for managing Discord servers, messages, reactions, threads, DMs, and events from the terminal. Published on PyPI as `discord-cli-agent`.
7+
discli is a Discord CLI for AI agents and humans — a Python command-line tool for managing Discord servers, messages, reactions, threads, DMs, events, voice audio, and rich interactive components (modals, workflows, dashboards) from the terminal. Published on PyPI as `discord-cli-agent`.
88

99
## Commands
1010

11+
This project uses [uv](https://docs.astral.sh/uv/) for dependency management.
12+
1113
```bash
12-
# Install (editable, with dev deps)
13-
pip install -e ".[dev]"
14+
# Install (editable, with dev deps) — creates .venv/ automatically
15+
uv sync --dev
16+
17+
# Install with voice features (TTS/STT providers)
18+
uv sync --dev --extra voice --extra elevenlabs --extra deepgram
1419

1520
# Run tests
16-
pytest tests/ -v
21+
uv run pytest tests/ -v
1722

1823
# Run a single test
19-
pytest tests/test_utils.py -v
24+
uv run pytest tests/test_utils.py -v
25+
26+
# Run the CLI
27+
uv run discli --help
2028

2129
# Build package
22-
python -m build
30+
uv build
2331
```
2432

2533
No linter is configured. Commit style: conventional commits (`feat:`, `fix:`, `docs:`, `chore:`).
@@ -32,13 +40,17 @@ No linter is configured. Commit style: conventional commits (`feat:`, `fix:`, `d
3240

3341
**Key modules:**
3442
- `client.py` — Token resolution (flag → env var → config file), `run_discord()` sync wrapper around async Discord actions
35-
- `security.py` — Permission profiles (full/chat/readonly/moderation), audit logging to `~/.discli/audit.log` (JSONL), token-bucket rate limiter
43+
- `security.py` — Permission profiles (full/chat/readonly/moderation/voice/interact), audit logging to `~/.discli/audit.log` (JSONL), token-bucket rate limiter
3644
- `utils.py` — Output formatting (text/JSON via `--json` flag), channel/guild resolvers
3745
- `config.py` — Token storage at `~/.discli/config.json`
46+
- `voice_engine.py` — VoiceEngine with AudioPlayer, AudioListener, VAD-based speech segmentation, audio codec handling
47+
- `interact_engine.py` — InteractEngine for modals, workflows, and dashboards with interaction routing and state management
48+
- `tts.py` — TTS provider protocol with ElevenLabs and OpenAI implementations
49+
- `stt.py` — STT provider protocol with Deepgram and OpenAI Whisper implementations
3850

3951
**Command pattern:** Each module in `commands/` defines Click commands, takes an async action function, and calls `run_discord(ctx, action)`. Follow existing modules when adding new commands.
4052

41-
**`serve` command (commands/serve.py):** The largest module (~1100 lines). Runs a persistent bot with bidirectional JSONL over stdin/stdout. Features: event forwarding, action dispatch (send/reply/edit/delete/stream/typing/reactions/threads/polls/channels/members/roles/DMs), slash command registration, streaming message edits with periodic flush, Windows-compatible stdin reading via threading.
53+
**`serve` command (commands/serve.py):** The largest module (~1200 lines). Runs a persistent bot with bidirectional JSONL over stdin/stdout. Features: event forwarding, action dispatch (send/reply/edit/delete/stream/typing/reactions/threads/polls/channels/members/roles/DMs), voice actions (connect/speak/play/listen/etc.), interactive actions (workflows, dashboards), slash command registration, streaming message edits with periodic flush, Windows-compatible stdin reading via threading.
4254

4355
## Adding a New Command
4456

CONTRIBUTING.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ Thanks for your interest in contributing!
44

55
## Development Setup
66

7+
This project uses [uv](https://docs.astral.sh/uv/) for dependency management. Install it first if you don't have it: see https://docs.astral.sh/uv/#installation.
8+
79
```bash
810
git clone https://github.com/DevRohit06/discli.git
911
cd discli
10-
pip install -e ".[dev]"
11-
pytest tests/ -v
12+
uv sync --dev
13+
uv run pytest tests/ -v
1214
```
1315

1416
## Adding a New Command
@@ -22,7 +24,7 @@ pytest tests/ -v
2224
## Running Tests
2325

2426
```bash
25-
pytest tests/ -v
27+
uv run pytest tests/ -v
2628
```
2729

2830
## Commit Style

0 commit comments

Comments
 (0)