deepctl 0.2.26__tar.gz → 0.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {deepctl-0.2.26/src/deepctl.egg-info → deepctl-0.3.1}/PKG-INFO +88 -52
- {deepctl-0.2.26 → deepctl-0.3.1}/README.md +54 -20
- {deepctl-0.2.26 → deepctl-0.3.1}/pyproject.toml +54 -34
- {deepctl-0.2.26 → deepctl-0.3.1}/src/deepctl/__init__.py +1 -1
- {deepctl-0.2.26 → deepctl-0.3.1}/src/deepctl/main.py +84 -9
- {deepctl-0.2.26 → deepctl-0.3.1/src/deepctl.egg-info}/PKG-INFO +88 -52
- deepctl-0.3.1/src/deepctl.egg-info/requires.txt +56 -0
- deepctl-0.2.26/src/deepctl.egg-info/requires.txt +0 -54
- {deepctl-0.2.26 → deepctl-0.3.1}/LICENSE +0 -0
- {deepctl-0.2.26 → deepctl-0.3.1}/setup.cfg +0 -0
- {deepctl-0.2.26 → deepctl-0.3.1}/src/deepctl.egg-info/SOURCES.txt +0 -0
- {deepctl-0.2.26 → deepctl-0.3.1}/src/deepctl.egg-info/dependency_links.txt +0 -0
- {deepctl-0.2.26 → deepctl-0.3.1}/src/deepctl.egg-info/entry_points.txt +0 -0
- {deepctl-0.2.26 → deepctl-0.3.1}/src/deepctl.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepctl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Official Deepgram CLI for speech recognition and audio intelligence
|
|
5
5
|
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
6
|
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
@@ -26,36 +26,36 @@ Requires-Python: >=3.10
|
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
28
|
Requires-Dist: click>=8.0.0
|
|
29
|
-
Requires-Dist: deepgram-sdk
|
|
30
|
-
Requires-Dist: deepctl-core>=0.
|
|
31
|
-
Requires-Dist: deepctl-cmd-login>=0.1.
|
|
32
|
-
Requires-Dist: deepctl-cmd-projects>=0.
|
|
33
|
-
Requires-Dist: deepctl-cmd-transcribe>=0.1.
|
|
34
|
-
Requires-Dist: deepctl-cmd-usage>=0.
|
|
35
|
-
Requires-Dist: deepctl-cmd-mcp>=0.1.
|
|
36
|
-
Requires-Dist: deepctl-cmd-api>=0.0.
|
|
37
|
-
Requires-Dist: deepctl-cmd-debug>=0.1.
|
|
38
|
-
Requires-Dist: deepctl-cmd-debug-browser>=0.1.
|
|
39
|
-
Requires-Dist: deepctl-cmd-debug-network>=0.1.
|
|
40
|
-
Requires-Dist: deepctl-cmd-debug-audio>=0.1.
|
|
41
|
-
Requires-Dist: deepctl-cmd-debug-probe>=0.0.
|
|
42
|
-
Requires-Dist: deepctl-cmd-debug-toolkit>=0.0
|
|
43
|
-
Requires-Dist: deepctl-cmd-ffprobe>=0.0.
|
|
44
|
-
Requires-Dist: deepctl-cmd-update>=0.
|
|
45
|
-
Requires-Dist: deepctl-cmd-plugin>=0.1.
|
|
46
|
-
Requires-Dist: deepctl-cmd-skills>=0.0.
|
|
47
|
-
Requires-Dist: deepctl-cmd-init>=0.0.
|
|
48
|
-
Requires-Dist: deepctl-cmd-models>=0.
|
|
49
|
-
Requires-Dist: deepctl-cmd-speak>=0.0.
|
|
50
|
-
Requires-Dist: deepctl-cmd-keys>=0.0
|
|
51
|
-
Requires-Dist: deepctl-cmd-read>=0.0
|
|
52
|
-
Requires-Dist: deepctl-cmd-listen>=0.0.
|
|
53
|
-
Requires-Dist: deepctl-cmd-requests>=0.0
|
|
54
|
-
Requires-Dist: deepctl-cmd-billing>=0.0
|
|
55
|
-
Requires-Dist: deepctl-cmd-members>=0.0
|
|
56
|
-
Requires-Dist: deepctl-cmd-completion>=0.0.
|
|
57
|
-
Requires-Dist: deepctl-shared-utils>=0.1.
|
|
58
|
-
Requires-Dist: deepctl-telemetry>=0.0.
|
|
29
|
+
Requires-Dist: deepgram-sdk<8,>=7.7.0
|
|
30
|
+
Requires-Dist: deepctl-core>=0.2.17
|
|
31
|
+
Requires-Dist: deepctl-cmd-login>=0.1.18
|
|
32
|
+
Requires-Dist: deepctl-cmd-projects>=0.2.0
|
|
33
|
+
Requires-Dist: deepctl-cmd-transcribe>=0.1.12
|
|
34
|
+
Requires-Dist: deepctl-cmd-usage>=0.2.0
|
|
35
|
+
Requires-Dist: deepctl-cmd-mcp>=0.1.15
|
|
36
|
+
Requires-Dist: deepctl-cmd-api>=0.0.2
|
|
37
|
+
Requires-Dist: deepctl-cmd-debug>=0.1.12
|
|
38
|
+
Requires-Dist: deepctl-cmd-debug-browser>=0.1.12
|
|
39
|
+
Requires-Dist: deepctl-cmd-debug-network>=0.1.12
|
|
40
|
+
Requires-Dist: deepctl-cmd-debug-audio>=0.1.13
|
|
41
|
+
Requires-Dist: deepctl-cmd-debug-probe>=0.0.2
|
|
42
|
+
Requires-Dist: deepctl-cmd-debug-toolkit>=0.1.0
|
|
43
|
+
Requires-Dist: deepctl-cmd-ffprobe>=0.0.2
|
|
44
|
+
Requires-Dist: deepctl-cmd-update>=0.2.7
|
|
45
|
+
Requires-Dist: deepctl-cmd-plugin>=0.1.13
|
|
46
|
+
Requires-Dist: deepctl-cmd-skills>=0.0.8
|
|
47
|
+
Requires-Dist: deepctl-cmd-init>=0.0.4
|
|
48
|
+
Requires-Dist: deepctl-cmd-models>=0.1.1
|
|
49
|
+
Requires-Dist: deepctl-cmd-speak>=0.0.4
|
|
50
|
+
Requires-Dist: deepctl-cmd-keys>=0.1.0
|
|
51
|
+
Requires-Dist: deepctl-cmd-read>=0.1.0
|
|
52
|
+
Requires-Dist: deepctl-cmd-listen>=0.0.14
|
|
53
|
+
Requires-Dist: deepctl-cmd-requests>=0.1.0
|
|
54
|
+
Requires-Dist: deepctl-cmd-billing>=0.1.0
|
|
55
|
+
Requires-Dist: deepctl-cmd-members>=0.1.0
|
|
56
|
+
Requires-Dist: deepctl-cmd-completion>=0.0.3
|
|
57
|
+
Requires-Dist: deepctl-shared-utils>=0.1.12
|
|
58
|
+
Requires-Dist: deepctl-telemetry>=0.0.6
|
|
59
59
|
Requires-Dist: pydantic>=2.0.0
|
|
60
60
|
Requires-Dist: rich>=13.0.0
|
|
61
61
|
Requires-Dist: httpx>=0.24.0
|
|
@@ -70,13 +70,15 @@ Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
|
70
70
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
71
71
|
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
72
72
|
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
|
|
73
|
+
Requires-Dist: pytest-timeout<3,>=2.3.1; extra == "dev"
|
|
73
74
|
Requires-Dist: responses>=0.23.0; extra == "dev"
|
|
74
75
|
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
|
75
76
|
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
77
|
+
Requires-Dist: packaging>=23.0; extra == "dev"
|
|
76
78
|
Requires-Dist: types-PyYAML>=6.0.0; extra == "dev"
|
|
77
79
|
Requires-Dist: types-requests>=2.31.0; extra == "dev"
|
|
78
80
|
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
79
|
-
Requires-Dist: twine>=
|
|
81
|
+
Requires-Dist: twine>=7.0.0; extra == "dev"
|
|
80
82
|
Requires-Dist: build>=0.10.0; extra == "dev"
|
|
81
83
|
Dynamic: license-file
|
|
82
84
|
|
|
@@ -115,8 +117,8 @@ intelligence, and project management directly into your terminal. Aliases:
|
|
|
115
117
|
**macOS / Linux (Homebrew):**
|
|
116
118
|
|
|
117
119
|
```bash
|
|
118
|
-
|
|
119
|
-
brew install deepgram
|
|
120
|
+
# Install and trust only the Deepgram formula.
|
|
121
|
+
brew install deepgram/tap/deepgram
|
|
120
122
|
```
|
|
121
123
|
|
|
122
124
|
Homebrew brings in `ffmpeg` and `portaudio` automatically — `dg listen --mic`, `dg debug probe`, and raw audio piping all work without further setup. To upgrade later: `brew upgrade deepgram`.
|
|
@@ -157,8 +159,8 @@ dg login
|
|
|
157
159
|
# Transcribe an audio file
|
|
158
160
|
dg listen recording.wav
|
|
159
161
|
|
|
160
|
-
# Text-to-speech
|
|
161
|
-
dg speak "Hello from Deepgram" -o hello.
|
|
162
|
+
# Text-to-speech (Flux TTS by default)
|
|
163
|
+
dg speak "Hello from Deepgram" -o hello.wav
|
|
162
164
|
|
|
163
165
|
# Live microphone transcription
|
|
164
166
|
dg listen --mic
|
|
@@ -183,6 +185,10 @@ dg -o json listen standup.mp3 \
|
|
|
183
185
|
# Live microphone with interim (partial) results
|
|
184
186
|
dg listen --mic --model nova-3 --interim
|
|
185
187
|
|
|
188
|
+
# Redact sensitive numbers and spell numbers as digits (files or live)
|
|
189
|
+
# Flux STT (v2) accepts --redact numbers|aggressive_numbers; v1 also pci, ssn, …
|
|
190
|
+
dg listen call.wav --redact numbers --numerals
|
|
191
|
+
|
|
186
192
|
# Raw audio stream from ffmpeg
|
|
187
193
|
ffmpeg -i video.mp4 -f s16le -ar 16000 -ac 1 - \
|
|
188
194
|
| dg listen --encoding linear16
|
|
@@ -214,8 +220,9 @@ dg read earnings.txt --sentiment --summarize --topics
|
|
|
214
220
|
### Text-to-speech
|
|
215
221
|
|
|
216
222
|
```bash
|
|
217
|
-
# Stream directly to a player
|
|
218
|
-
|
|
223
|
+
# Stream directly to a player (Flux TTS streams a WAV; -loglevel error hides
|
|
224
|
+
# ffmpeg's cosmetic end-of-stream notice)
|
|
225
|
+
dg speak "Hello from Deepgram" | ffplay -loglevel error -nodisp -autoexit -
|
|
219
226
|
```
|
|
220
227
|
|
|
221
228
|
### Account & project management
|
|
@@ -255,22 +262,30 @@ cat audio.raw | dg listen --encoding linear16 --sample-rate 16000
|
|
|
255
262
|
|
|
256
263
|
Convert text to natural speech. Supports file output and piping.
|
|
257
264
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
265
|
+
By default `dg speak` uses Flux TTS (`flux-alexis-en`) — the Speak v2 WebSocket
|
|
266
|
+
API, which streams and emits raw audio; its `linear16` output is wrapped in a WAV
|
|
267
|
+
container so it is directly playable. Pass an `aura-*` model to use the Speak v1
|
|
268
|
+
batch REST API instead, which supports containerized formats like MP3.
|
|
261
269
|
|
|
262
270
|
```bash
|
|
263
|
-
#
|
|
264
|
-
dg speak "
|
|
265
|
-
dg speak --file script.txt -o output.mp3 -m aura-2-luna-en
|
|
266
|
-
echo "Hello" | dg speak -o greeting.mp3
|
|
267
|
-
dg speak "Stream me" | ffplay -nodisp - # pipe to audio player
|
|
268
|
-
|
|
269
|
-
# Flux TTS (v2, WebSocket streaming)
|
|
270
|
-
dg speak "Hello from Flux" -m flux-alexis-en -o hello.wav
|
|
271
|
+
# Flux TTS (v2, WebSocket streaming) — the default
|
|
272
|
+
dg speak "Hello from Flux" -o hello.wav
|
|
271
273
|
# Piped audio is a streaming WAV; -loglevel error hides ffmpeg's cosmetic
|
|
272
274
|
# end-of-stream notice (the audio is complete).
|
|
273
|
-
dg speak "Hello from Flux"
|
|
275
|
+
dg speak "Hello from Flux" | ffplay -loglevel error -nodisp -autoexit -
|
|
276
|
+
|
|
277
|
+
# Flux TTS streaming controls (flux-* only): --speed 0.85–1.15 (0.05 steps).
|
|
278
|
+
# --expressivity -2..2 is beta; its default 0 is nominal delivery.
|
|
279
|
+
dg speak "A little slower" --speed 0.9 --expressivity 1 -o slow.wav
|
|
280
|
+
|
|
281
|
+
# Aura (v1, batch REST) — opt in with -m aura-*; needed for MP3 output
|
|
282
|
+
dg speak "Welcome to Deepgram" -o welcome.mp3 -m aura-2-asteria-en
|
|
283
|
+
dg speak --file script.txt -o output.mp3 -m aura-2-luna-en
|
|
284
|
+
echo "Hello" | dg speak -o greeting.mp3 -m aura-2-asteria-en
|
|
285
|
+
|
|
286
|
+
# Aura-2 also has Spanish voices (e.g. aura-2-selena-es); run `dg models`
|
|
287
|
+
# for the full, current list.
|
|
288
|
+
dg speak "Hola, bienvenido a Deepgram" -o hola.mp3 -m aura-2-selena-es
|
|
274
289
|
```
|
|
275
290
|
|
|
276
291
|
### Text Intelligence
|
|
@@ -374,7 +389,7 @@ export DEEPGRAM_PROJECT_ID="your-project-id"
|
|
|
374
389
|
|
|
375
390
|
# Non-interactive usage
|
|
376
391
|
dg listen recording.wav
|
|
377
|
-
dg speak "Deploy complete" -o notification.mp3
|
|
392
|
+
dg speak "Deploy complete" -o notification.mp3 -m aura-2-asteria-en
|
|
378
393
|
dg keys --create --comment "ci-key" --scopes member
|
|
379
394
|
dg keys --delete KEY_ID --yes
|
|
380
395
|
dg read --file report.txt --summarize
|
|
@@ -388,6 +403,24 @@ dg usage --last-week -o yaml
|
|
|
388
403
|
When running in a non-TTY environment (pipes, CI, or AI coding tools), the CLI
|
|
389
404
|
automatically switches to structured JSON output with plain-text status messages.
|
|
390
405
|
|
|
406
|
+
### Exit codes
|
|
407
|
+
|
|
408
|
+
Since 0.3.0, `dg` exits non-zero when a command fails — branch on the exit
|
|
409
|
+
code, not on parsing output:
|
|
410
|
+
|
|
411
|
+
| Code | Meaning |
|
|
412
|
+
| --- | --- |
|
|
413
|
+
| `0` | Success |
|
|
414
|
+
| `1` | Error — a failed command, a crash, or a usage error (bad flag, unknown command) |
|
|
415
|
+
| `2` | Cancelled by the user (Ctrl-C, or declining a confirmation prompt) |
|
|
416
|
+
|
|
417
|
+
Note that `dg` reports `2` for an interrupt rather than the shell's
|
|
418
|
+
conventional `130`, so the code is the same whether the cancellation came from
|
|
419
|
+
Ctrl-C or from declining a prompt.
|
|
420
|
+
|
|
421
|
+
If a CI step relied on `dg` always exiting `0` (every command did, before
|
|
422
|
+
0.3.0), it will now fail where it previously passed silently.
|
|
423
|
+
|
|
391
424
|
### Forcing non-interactive mode
|
|
392
425
|
|
|
393
426
|
Three explicit ways to skip every prompt and run with defaults — useful from a
|
|
@@ -431,7 +464,10 @@ dg profiles --list # List profiles
|
|
|
431
464
|
dg profiles --switch staging # Switch profile
|
|
432
465
|
```
|
|
433
466
|
|
|
434
|
-
|
|
467
|
+
For structured output, use `--output json|yaml|table|csv` after leaf commands
|
|
468
|
+
that do not define their own output option, or before any command as a global
|
|
469
|
+
flag: `dg --output json <command>`. `dg speak --output FILE` writes audio to
|
|
470
|
+
`FILE`, so use `dg --output json speak ...` for Speak's structured output.
|
|
435
471
|
|
|
436
472
|
## Telemetry
|
|
437
473
|
|
|
@@ -33,8 +33,8 @@ intelligence, and project management directly into your terminal. Aliases:
|
|
|
33
33
|
**macOS / Linux (Homebrew):**
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
|
|
37
|
-
brew install deepgram
|
|
36
|
+
# Install and trust only the Deepgram formula.
|
|
37
|
+
brew install deepgram/tap/deepgram
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
Homebrew brings in `ffmpeg` and `portaudio` automatically — `dg listen --mic`, `dg debug probe`, and raw audio piping all work without further setup. To upgrade later: `brew upgrade deepgram`.
|
|
@@ -75,8 +75,8 @@ dg login
|
|
|
75
75
|
# Transcribe an audio file
|
|
76
76
|
dg listen recording.wav
|
|
77
77
|
|
|
78
|
-
# Text-to-speech
|
|
79
|
-
dg speak "Hello from Deepgram" -o hello.
|
|
78
|
+
# Text-to-speech (Flux TTS by default)
|
|
79
|
+
dg speak "Hello from Deepgram" -o hello.wav
|
|
80
80
|
|
|
81
81
|
# Live microphone transcription
|
|
82
82
|
dg listen --mic
|
|
@@ -101,6 +101,10 @@ dg -o json listen standup.mp3 \
|
|
|
101
101
|
# Live microphone with interim (partial) results
|
|
102
102
|
dg listen --mic --model nova-3 --interim
|
|
103
103
|
|
|
104
|
+
# Redact sensitive numbers and spell numbers as digits (files or live)
|
|
105
|
+
# Flux STT (v2) accepts --redact numbers|aggressive_numbers; v1 also pci, ssn, …
|
|
106
|
+
dg listen call.wav --redact numbers --numerals
|
|
107
|
+
|
|
104
108
|
# Raw audio stream from ffmpeg
|
|
105
109
|
ffmpeg -i video.mp4 -f s16le -ar 16000 -ac 1 - \
|
|
106
110
|
| dg listen --encoding linear16
|
|
@@ -132,8 +136,9 @@ dg read earnings.txt --sentiment --summarize --topics
|
|
|
132
136
|
### Text-to-speech
|
|
133
137
|
|
|
134
138
|
```bash
|
|
135
|
-
# Stream directly to a player
|
|
136
|
-
|
|
139
|
+
# Stream directly to a player (Flux TTS streams a WAV; -loglevel error hides
|
|
140
|
+
# ffmpeg's cosmetic end-of-stream notice)
|
|
141
|
+
dg speak "Hello from Deepgram" | ffplay -loglevel error -nodisp -autoexit -
|
|
137
142
|
```
|
|
138
143
|
|
|
139
144
|
### Account & project management
|
|
@@ -173,22 +178,30 @@ cat audio.raw | dg listen --encoding linear16 --sample-rate 16000
|
|
|
173
178
|
|
|
174
179
|
Convert text to natural speech. Supports file output and piping.
|
|
175
180
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
By default `dg speak` uses Flux TTS (`flux-alexis-en`) — the Speak v2 WebSocket
|
|
182
|
+
API, which streams and emits raw audio; its `linear16` output is wrapped in a WAV
|
|
183
|
+
container so it is directly playable. Pass an `aura-*` model to use the Speak v1
|
|
184
|
+
batch REST API instead, which supports containerized formats like MP3.
|
|
179
185
|
|
|
180
186
|
```bash
|
|
181
|
-
#
|
|
182
|
-
dg speak "
|
|
183
|
-
dg speak --file script.txt -o output.mp3 -m aura-2-luna-en
|
|
184
|
-
echo "Hello" | dg speak -o greeting.mp3
|
|
185
|
-
dg speak "Stream me" | ffplay -nodisp - # pipe to audio player
|
|
186
|
-
|
|
187
|
-
# Flux TTS (v2, WebSocket streaming)
|
|
188
|
-
dg speak "Hello from Flux" -m flux-alexis-en -o hello.wav
|
|
187
|
+
# Flux TTS (v2, WebSocket streaming) — the default
|
|
188
|
+
dg speak "Hello from Flux" -o hello.wav
|
|
189
189
|
# Piped audio is a streaming WAV; -loglevel error hides ffmpeg's cosmetic
|
|
190
190
|
# end-of-stream notice (the audio is complete).
|
|
191
|
-
dg speak "Hello from Flux"
|
|
191
|
+
dg speak "Hello from Flux" | ffplay -loglevel error -nodisp -autoexit -
|
|
192
|
+
|
|
193
|
+
# Flux TTS streaming controls (flux-* only): --speed 0.85–1.15 (0.05 steps).
|
|
194
|
+
# --expressivity -2..2 is beta; its default 0 is nominal delivery.
|
|
195
|
+
dg speak "A little slower" --speed 0.9 --expressivity 1 -o slow.wav
|
|
196
|
+
|
|
197
|
+
# Aura (v1, batch REST) — opt in with -m aura-*; needed for MP3 output
|
|
198
|
+
dg speak "Welcome to Deepgram" -o welcome.mp3 -m aura-2-asteria-en
|
|
199
|
+
dg speak --file script.txt -o output.mp3 -m aura-2-luna-en
|
|
200
|
+
echo "Hello" | dg speak -o greeting.mp3 -m aura-2-asteria-en
|
|
201
|
+
|
|
202
|
+
# Aura-2 also has Spanish voices (e.g. aura-2-selena-es); run `dg models`
|
|
203
|
+
# for the full, current list.
|
|
204
|
+
dg speak "Hola, bienvenido a Deepgram" -o hola.mp3 -m aura-2-selena-es
|
|
192
205
|
```
|
|
193
206
|
|
|
194
207
|
### Text Intelligence
|
|
@@ -292,7 +305,7 @@ export DEEPGRAM_PROJECT_ID="your-project-id"
|
|
|
292
305
|
|
|
293
306
|
# Non-interactive usage
|
|
294
307
|
dg listen recording.wav
|
|
295
|
-
dg speak "Deploy complete" -o notification.mp3
|
|
308
|
+
dg speak "Deploy complete" -o notification.mp3 -m aura-2-asteria-en
|
|
296
309
|
dg keys --create --comment "ci-key" --scopes member
|
|
297
310
|
dg keys --delete KEY_ID --yes
|
|
298
311
|
dg read --file report.txt --summarize
|
|
@@ -306,6 +319,24 @@ dg usage --last-week -o yaml
|
|
|
306
319
|
When running in a non-TTY environment (pipes, CI, or AI coding tools), the CLI
|
|
307
320
|
automatically switches to structured JSON output with plain-text status messages.
|
|
308
321
|
|
|
322
|
+
### Exit codes
|
|
323
|
+
|
|
324
|
+
Since 0.3.0, `dg` exits non-zero when a command fails — branch on the exit
|
|
325
|
+
code, not on parsing output:
|
|
326
|
+
|
|
327
|
+
| Code | Meaning |
|
|
328
|
+
| --- | --- |
|
|
329
|
+
| `0` | Success |
|
|
330
|
+
| `1` | Error — a failed command, a crash, or a usage error (bad flag, unknown command) |
|
|
331
|
+
| `2` | Cancelled by the user (Ctrl-C, or declining a confirmation prompt) |
|
|
332
|
+
|
|
333
|
+
Note that `dg` reports `2` for an interrupt rather than the shell's
|
|
334
|
+
conventional `130`, so the code is the same whether the cancellation came from
|
|
335
|
+
Ctrl-C or from declining a prompt.
|
|
336
|
+
|
|
337
|
+
If a CI step relied on `dg` always exiting `0` (every command did, before
|
|
338
|
+
0.3.0), it will now fail where it previously passed silently.
|
|
339
|
+
|
|
309
340
|
### Forcing non-interactive mode
|
|
310
341
|
|
|
311
342
|
Three explicit ways to skip every prompt and run with defaults — useful from a
|
|
@@ -349,7 +380,10 @@ dg profiles --list # List profiles
|
|
|
349
380
|
dg profiles --switch staging # Switch profile
|
|
350
381
|
```
|
|
351
382
|
|
|
352
|
-
|
|
383
|
+
For structured output, use `--output json|yaml|table|csv` after leaf commands
|
|
384
|
+
that do not define their own output option, or before any command as a global
|
|
385
|
+
flag: `dg --output json <command>`. `dg speak --output FILE` writes audio to
|
|
386
|
+
`FILE`, so use `dg --output json speak ...` for Speak's structured output.
|
|
353
387
|
|
|
354
388
|
## Telemetry
|
|
355
389
|
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "deepctl"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.1" # x-release-please-version
|
|
8
8
|
description = "Official Deepgram CLI for speech recognition and audio intelligence"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "MIT"
|
|
@@ -34,36 +34,36 @@ keywords = [
|
|
|
34
34
|
requires-python = ">=3.10"
|
|
35
35
|
dependencies = [
|
|
36
36
|
"click>=8.0.0",
|
|
37
|
-
"deepgram-sdk>=7.
|
|
38
|
-
"deepctl-core>=0.
|
|
39
|
-
"deepctl-cmd-login>=0.1.
|
|
40
|
-
"deepctl-cmd-projects>=0.
|
|
41
|
-
"deepctl-cmd-transcribe>=0.1.
|
|
42
|
-
"deepctl-cmd-usage>=0.
|
|
43
|
-
"deepctl-cmd-mcp>=0.1.
|
|
44
|
-
"deepctl-cmd-api>=0.0.
|
|
45
|
-
"deepctl-cmd-debug>=0.1.
|
|
46
|
-
"deepctl-cmd-debug-browser>=0.1.
|
|
47
|
-
"deepctl-cmd-debug-network>=0.1.
|
|
48
|
-
"deepctl-cmd-debug-audio>=0.1.
|
|
49
|
-
"deepctl-cmd-debug-probe>=0.0.
|
|
50
|
-
"deepctl-cmd-debug-toolkit>=0.0
|
|
51
|
-
"deepctl-cmd-ffprobe>=0.0.
|
|
52
|
-
"deepctl-cmd-update>=0.
|
|
53
|
-
"deepctl-cmd-plugin>=0.1.
|
|
54
|
-
"deepctl-cmd-skills>=0.0.
|
|
55
|
-
"deepctl-cmd-init>=0.0.
|
|
56
|
-
"deepctl-cmd-models>=0.
|
|
57
|
-
"deepctl-cmd-speak>=0.0.
|
|
58
|
-
"deepctl-cmd-keys>=0.0
|
|
59
|
-
"deepctl-cmd-read>=0.0
|
|
60
|
-
"deepctl-cmd-listen>=0.0.
|
|
61
|
-
"deepctl-cmd-requests>=0.0
|
|
62
|
-
"deepctl-cmd-billing>=0.0
|
|
63
|
-
"deepctl-cmd-members>=0.0
|
|
64
|
-
"deepctl-cmd-completion>=0.0.
|
|
65
|
-
"deepctl-shared-utils>=0.1.
|
|
66
|
-
"deepctl-telemetry>=0.0.
|
|
37
|
+
"deepgram-sdk>=7.7.0,<8",
|
|
38
|
+
"deepctl-core>=0.2.17",
|
|
39
|
+
"deepctl-cmd-login>=0.1.18",
|
|
40
|
+
"deepctl-cmd-projects>=0.2.0",
|
|
41
|
+
"deepctl-cmd-transcribe>=0.1.12",
|
|
42
|
+
"deepctl-cmd-usage>=0.2.0",
|
|
43
|
+
"deepctl-cmd-mcp>=0.1.15",
|
|
44
|
+
"deepctl-cmd-api>=0.0.2",
|
|
45
|
+
"deepctl-cmd-debug>=0.1.12",
|
|
46
|
+
"deepctl-cmd-debug-browser>=0.1.12",
|
|
47
|
+
"deepctl-cmd-debug-network>=0.1.12",
|
|
48
|
+
"deepctl-cmd-debug-audio>=0.1.13",
|
|
49
|
+
"deepctl-cmd-debug-probe>=0.0.2",
|
|
50
|
+
"deepctl-cmd-debug-toolkit>=0.1.0",
|
|
51
|
+
"deepctl-cmd-ffprobe>=0.0.2",
|
|
52
|
+
"deepctl-cmd-update>=0.2.7",
|
|
53
|
+
"deepctl-cmd-plugin>=0.1.13",
|
|
54
|
+
"deepctl-cmd-skills>=0.0.8",
|
|
55
|
+
"deepctl-cmd-init>=0.0.4",
|
|
56
|
+
"deepctl-cmd-models>=0.1.1",
|
|
57
|
+
"deepctl-cmd-speak>=0.0.4",
|
|
58
|
+
"deepctl-cmd-keys>=0.1.0",
|
|
59
|
+
"deepctl-cmd-read>=0.1.0",
|
|
60
|
+
"deepctl-cmd-listen>=0.0.14",
|
|
61
|
+
"deepctl-cmd-requests>=0.1.0",
|
|
62
|
+
"deepctl-cmd-billing>=0.1.0",
|
|
63
|
+
"deepctl-cmd-members>=0.1.0",
|
|
64
|
+
"deepctl-cmd-completion>=0.0.3",
|
|
65
|
+
"deepctl-shared-utils>=0.1.12",
|
|
66
|
+
"deepctl-telemetry>=0.0.6",
|
|
67
67
|
"pydantic>=2.0.0",
|
|
68
68
|
"rich>=13.0.0",
|
|
69
69
|
"httpx>=0.24.0",
|
|
@@ -82,17 +82,21 @@ dev = [
|
|
|
82
82
|
"pytest-asyncio>=0.21.0",
|
|
83
83
|
"pytest-cov>=4.0.0",
|
|
84
84
|
"pytest-mock>=3.10.0",
|
|
85
|
+
"pytest-timeout>=2.3.1,<3",
|
|
85
86
|
"responses>=0.23.0",
|
|
86
87
|
# Code Quality
|
|
87
88
|
"ruff>=0.8.0",
|
|
88
89
|
"mypy>=1.0.0",
|
|
90
|
+
"packaging>=23.0",
|
|
89
91
|
# Type Stubs
|
|
90
92
|
"types-PyYAML>=6.0.0",
|
|
91
93
|
"types-requests>=2.31.0",
|
|
92
94
|
# Development Tools
|
|
93
95
|
"pre-commit>=3.0.0",
|
|
94
96
|
# Publishing
|
|
95
|
-
|
|
97
|
+
# twine <7 rejects Metadata-Version 2.5 (emitted by hatchling), which
|
|
98
|
+
# silently broke the 0.2.27 publish. Keep local verify == what publishes.
|
|
99
|
+
"twine>=7.0.0",
|
|
96
100
|
"build>=0.10.0",
|
|
97
101
|
]
|
|
98
102
|
|
|
@@ -125,7 +129,13 @@ include = ["deepctl*"]
|
|
|
125
129
|
[tool.mypy]
|
|
126
130
|
python_version = "3.10"
|
|
127
131
|
strict = true
|
|
128
|
-
files = "src/,packages/*/src"
|
|
132
|
+
files = "src/,packages/*/src,scripts/"
|
|
133
|
+
|
|
134
|
+
[[tool.mypy.overrides]]
|
|
135
|
+
module = ["tomli"]
|
|
136
|
+
# The pre-3.11 fallback for tomllib in scripts/. It is not installed, and
|
|
137
|
+
# mypy checks that branch because python_version is pinned to 3.10.
|
|
138
|
+
ignore_missing_imports = true
|
|
129
139
|
|
|
130
140
|
[[tool.mypy.overrides]]
|
|
131
141
|
module = "deepctl_cmd_mcp.*"
|
|
@@ -229,9 +239,14 @@ members = ["packages/*"]
|
|
|
229
239
|
[dependency-groups]
|
|
230
240
|
testing = [
|
|
231
241
|
"pytest>=7.0.0",
|
|
242
|
+
# scripts/check_dependency_floors.py reads pyproject files; on 3.10 it
|
|
243
|
+
# falls back to tomli, and tests/unit/test_dependency_floors.py drives
|
|
244
|
+
# the real script on every version in the CI matrix.
|
|
245
|
+
"tomli>=2.0; python_version < '3.11'",
|
|
232
246
|
"pytest-asyncio>=0.21.0",
|
|
233
247
|
"pytest-cov>=4.0.0",
|
|
234
248
|
"pytest-mock>=3.10.0",
|
|
249
|
+
"pytest-timeout>=2.3.1,<3",
|
|
235
250
|
"responses>=0.23.0",
|
|
236
251
|
"deepctl-plugin-example",
|
|
237
252
|
]
|
|
@@ -240,13 +255,18 @@ dev = [
|
|
|
240
255
|
# Code Quality
|
|
241
256
|
"ruff>=0.8.0",
|
|
242
257
|
"mypy>=1.0.0",
|
|
258
|
+
# PEP 440 comparisons in scripts/check_dependency_floors.py. Declared
|
|
259
|
+
# rather than leaned on as a transitive of build/twine.
|
|
260
|
+
"packaging>=23.0",
|
|
243
261
|
# Type Stubs
|
|
244
262
|
"types-pyyaml>=6.0.12.20250516",
|
|
245
263
|
"types-requests>=2.32.4.20250611",
|
|
246
264
|
# Development Tools
|
|
247
265
|
"pre-commit>=3.0.0",
|
|
248
266
|
# Publishing
|
|
249
|
-
|
|
267
|
+
# twine <7 rejects Metadata-Version 2.5 (emitted by hatchling), which
|
|
268
|
+
# silently broke the 0.2.27 publish. Keep local verify == what publishes.
|
|
269
|
+
"twine>=7.0.0",
|
|
250
270
|
"build>=0.10.0",
|
|
251
271
|
]
|
|
252
272
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""deepctl - Official command-line interface for Deepgram's speech
|
|
2
2
|
recognition API."""
|
|
3
3
|
|
|
4
|
-
__version__ = "0.
|
|
4
|
+
__version__ = "0.3.1" # x-release-please-version
|
|
5
5
|
__author__ = "Deepgram"
|
|
6
6
|
__email__ = "devrel@deepgram.com"
|
|
7
7
|
__license__ = "MIT"
|
|
@@ -19,12 +19,18 @@ from deepctl_core import (
|
|
|
19
19
|
print_timing_summary,
|
|
20
20
|
setup_output,
|
|
21
21
|
)
|
|
22
|
-
from
|
|
22
|
+
from deepctl_core.output import stderr_console
|
|
23
23
|
from rich.traceback import install
|
|
24
24
|
|
|
25
25
|
# Install rich traceback for better error messages
|
|
26
26
|
install(show_locals=True)
|
|
27
|
-
|
|
27
|
+
|
|
28
|
+
# Diagnostics go to stderr so stdout carries only the requested payload -- a
|
|
29
|
+
# crash or usage error must not corrupt `dg -o json ...` for a script piping
|
|
30
|
+
# stdout into jq. Same console the command layer uses via print_error(), so
|
|
31
|
+
# root-level and command-level diagnostics format identically (including the
|
|
32
|
+
# no-color handling for agentic/CI callers).
|
|
33
|
+
console = stderr_console
|
|
28
34
|
|
|
29
35
|
|
|
30
36
|
def _record_install_method_cb(
|
|
@@ -281,6 +287,52 @@ def _telemetry_transaction() -> Iterator[None]:
|
|
|
281
287
|
yield
|
|
282
288
|
|
|
283
289
|
|
|
290
|
+
def _global_option_hint(message: str) -> str | None:
|
|
291
|
+
"""Build a placement hint when a 'No such option' names a global option.
|
|
292
|
+
|
|
293
|
+
Global options belong before the subcommand (``dg -o json models``).
|
|
294
|
+
When one is placed after the subcommand instead (``dg models --profile
|
|
295
|
+
staging``), Click reports "No such option" with no explanation, which
|
|
296
|
+
reads as if the option does not exist at all. This looks the failing
|
|
297
|
+
option up on the root group and, when it is a global one, returns a
|
|
298
|
+
hint showing the working placement.
|
|
299
|
+
"""
|
|
300
|
+
import re
|
|
301
|
+
|
|
302
|
+
match = re.search(r"[Nn]o such option:?\s*'?(--?[A-Za-z][\w-]*)'?", message)
|
|
303
|
+
if not match:
|
|
304
|
+
return None
|
|
305
|
+
token = match.group(1)
|
|
306
|
+
|
|
307
|
+
for param in cli.params:
|
|
308
|
+
opts = list(getattr(param, "opts", [])) + list(
|
|
309
|
+
getattr(param, "secondary_opts", [])
|
|
310
|
+
)
|
|
311
|
+
if token in opts:
|
|
312
|
+
takes_value = not getattr(param, "is_flag", False)
|
|
313
|
+
usage = f"{token} <value>" if takes_value else token
|
|
314
|
+
return (
|
|
315
|
+
f"[yellow]Hint: '{token}' is a global option and must come "
|
|
316
|
+
f"before the subcommand, for example: "
|
|
317
|
+
f"dg {usage} <command> ...[/yellow]"
|
|
318
|
+
)
|
|
319
|
+
return None
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
def _safe_console_print(message: str) -> None:
|
|
323
|
+
"""Print a diagnostic to stderr, tolerating a closed/broken stream.
|
|
324
|
+
|
|
325
|
+
When `dg` runs as an MCP server, the host can close stdio before the
|
|
326
|
+
process finishes. A write to the closed stream raises ``BrokenPipeError``
|
|
327
|
+
(or rich's ``ValueError: I/O operation on closed file``); there is nowhere
|
|
328
|
+
left to report the message, so swallow it rather than crash on exit.
|
|
329
|
+
"""
|
|
330
|
+
try:
|
|
331
|
+
console.print(message)
|
|
332
|
+
except (BrokenPipeError, OSError, ValueError):
|
|
333
|
+
pass
|
|
334
|
+
|
|
335
|
+
|
|
284
336
|
def main() -> None:
|
|
285
337
|
"""Main entry point for the CLI."""
|
|
286
338
|
try:
|
|
@@ -347,12 +399,18 @@ def main() -> None:
|
|
|
347
399
|
# Preprocess arguments to handle hyphenated commands
|
|
348
400
|
processed_args = preprocess_hyphenated_commands(args)
|
|
349
401
|
|
|
402
|
+
exit_code = 0
|
|
350
403
|
with TimingContext("cli_execution"), _telemetry_transaction():
|
|
351
404
|
try:
|
|
352
405
|
cli(args=processed_args, standalone_mode=False)
|
|
353
|
-
except SystemExit:
|
|
354
|
-
# Click calls sys.exit() even in non-standalone mode
|
|
355
|
-
|
|
406
|
+
except SystemExit as exc:
|
|
407
|
+
# Click calls sys.exit() even in non-standalone mode, so we
|
|
408
|
+
# cannot let this propagate — the notifications and timing
|
|
409
|
+
# summary below still need to run. But swallowing the code
|
|
410
|
+
# outright made every failure exit 0, which is what broke
|
|
411
|
+
# `if dg -o json keys; then ...` in scripts and CI. Carry it
|
|
412
|
+
# and re-raise at the end instead.
|
|
413
|
+
exit_code = exc.code if isinstance(exc.code, int) else 0
|
|
356
414
|
|
|
357
415
|
# Print update notifications if available (before timing summary)
|
|
358
416
|
if print_pending_notification is not None:
|
|
@@ -366,12 +424,29 @@ def main() -> None:
|
|
|
366
424
|
if timing_requested:
|
|
367
425
|
print_timing_summary(detailed_timing)
|
|
368
426
|
|
|
369
|
-
|
|
370
|
-
|
|
427
|
+
if exit_code:
|
|
428
|
+
sys.exit(exit_code)
|
|
429
|
+
|
|
430
|
+
except (KeyboardInterrupt, click.exceptions.Abort):
|
|
431
|
+
# Click wraps a Ctrl-C/Ctrl-D raised inside cli() in Abort when
|
|
432
|
+
# standalone_mode=False, so a mid-command interrupt arrives here as
|
|
433
|
+
# Abort, not KeyboardInterrupt. Both are user cancellation: exit 2.
|
|
434
|
+
_safe_console_print("\n[yellow]Operation cancelled by user[/yellow]")
|
|
371
435
|
sys.exit(2)
|
|
436
|
+
except click.UsageError as e:
|
|
437
|
+
# Keep the published exit-code contract (1 = error), but explain the
|
|
438
|
+
# one failure mode that reads as a lie: a *global* option placed
|
|
439
|
+
# after the subcommand, where Click says "No such option" about an
|
|
440
|
+
# option that very much exists.
|
|
441
|
+
message = e.format_message()
|
|
442
|
+
_safe_console_print(f"[red]Error: {message}[/red]")
|
|
443
|
+
hint = _global_option_hint(message)
|
|
444
|
+
if hint:
|
|
445
|
+
_safe_console_print(hint)
|
|
446
|
+
sys.exit(1)
|
|
372
447
|
except Exception as e:
|
|
373
|
-
|
|
374
|
-
sys.exit(2
|
|
448
|
+
_safe_console_print(f"[red]Error: {e}[/red]")
|
|
449
|
+
sys.exit(1) # 1 = error; 2 is reserved for user interrupt
|
|
375
450
|
|
|
376
451
|
|
|
377
452
|
if __name__ == "__main__":
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: deepctl
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Official Deepgram CLI for speech recognition and audio intelligence
|
|
5
5
|
Author-email: Deepgram <devrel@deepgram.com>
|
|
6
6
|
Maintainer-email: Deepgram <devrel@deepgram.com>
|
|
@@ -26,36 +26,36 @@ Requires-Python: >=3.10
|
|
|
26
26
|
Description-Content-Type: text/markdown
|
|
27
27
|
License-File: LICENSE
|
|
28
28
|
Requires-Dist: click>=8.0.0
|
|
29
|
-
Requires-Dist: deepgram-sdk
|
|
30
|
-
Requires-Dist: deepctl-core>=0.
|
|
31
|
-
Requires-Dist: deepctl-cmd-login>=0.1.
|
|
32
|
-
Requires-Dist: deepctl-cmd-projects>=0.
|
|
33
|
-
Requires-Dist: deepctl-cmd-transcribe>=0.1.
|
|
34
|
-
Requires-Dist: deepctl-cmd-usage>=0.
|
|
35
|
-
Requires-Dist: deepctl-cmd-mcp>=0.1.
|
|
36
|
-
Requires-Dist: deepctl-cmd-api>=0.0.
|
|
37
|
-
Requires-Dist: deepctl-cmd-debug>=0.1.
|
|
38
|
-
Requires-Dist: deepctl-cmd-debug-browser>=0.1.
|
|
39
|
-
Requires-Dist: deepctl-cmd-debug-network>=0.1.
|
|
40
|
-
Requires-Dist: deepctl-cmd-debug-audio>=0.1.
|
|
41
|
-
Requires-Dist: deepctl-cmd-debug-probe>=0.0.
|
|
42
|
-
Requires-Dist: deepctl-cmd-debug-toolkit>=0.0
|
|
43
|
-
Requires-Dist: deepctl-cmd-ffprobe>=0.0.
|
|
44
|
-
Requires-Dist: deepctl-cmd-update>=0.
|
|
45
|
-
Requires-Dist: deepctl-cmd-plugin>=0.1.
|
|
46
|
-
Requires-Dist: deepctl-cmd-skills>=0.0.
|
|
47
|
-
Requires-Dist: deepctl-cmd-init>=0.0.
|
|
48
|
-
Requires-Dist: deepctl-cmd-models>=0.
|
|
49
|
-
Requires-Dist: deepctl-cmd-speak>=0.0.
|
|
50
|
-
Requires-Dist: deepctl-cmd-keys>=0.0
|
|
51
|
-
Requires-Dist: deepctl-cmd-read>=0.0
|
|
52
|
-
Requires-Dist: deepctl-cmd-listen>=0.0.
|
|
53
|
-
Requires-Dist: deepctl-cmd-requests>=0.0
|
|
54
|
-
Requires-Dist: deepctl-cmd-billing>=0.0
|
|
55
|
-
Requires-Dist: deepctl-cmd-members>=0.0
|
|
56
|
-
Requires-Dist: deepctl-cmd-completion>=0.0.
|
|
57
|
-
Requires-Dist: deepctl-shared-utils>=0.1.
|
|
58
|
-
Requires-Dist: deepctl-telemetry>=0.0.
|
|
29
|
+
Requires-Dist: deepgram-sdk<8,>=7.7.0
|
|
30
|
+
Requires-Dist: deepctl-core>=0.2.17
|
|
31
|
+
Requires-Dist: deepctl-cmd-login>=0.1.18
|
|
32
|
+
Requires-Dist: deepctl-cmd-projects>=0.2.0
|
|
33
|
+
Requires-Dist: deepctl-cmd-transcribe>=0.1.12
|
|
34
|
+
Requires-Dist: deepctl-cmd-usage>=0.2.0
|
|
35
|
+
Requires-Dist: deepctl-cmd-mcp>=0.1.15
|
|
36
|
+
Requires-Dist: deepctl-cmd-api>=0.0.2
|
|
37
|
+
Requires-Dist: deepctl-cmd-debug>=0.1.12
|
|
38
|
+
Requires-Dist: deepctl-cmd-debug-browser>=0.1.12
|
|
39
|
+
Requires-Dist: deepctl-cmd-debug-network>=0.1.12
|
|
40
|
+
Requires-Dist: deepctl-cmd-debug-audio>=0.1.13
|
|
41
|
+
Requires-Dist: deepctl-cmd-debug-probe>=0.0.2
|
|
42
|
+
Requires-Dist: deepctl-cmd-debug-toolkit>=0.1.0
|
|
43
|
+
Requires-Dist: deepctl-cmd-ffprobe>=0.0.2
|
|
44
|
+
Requires-Dist: deepctl-cmd-update>=0.2.7
|
|
45
|
+
Requires-Dist: deepctl-cmd-plugin>=0.1.13
|
|
46
|
+
Requires-Dist: deepctl-cmd-skills>=0.0.8
|
|
47
|
+
Requires-Dist: deepctl-cmd-init>=0.0.4
|
|
48
|
+
Requires-Dist: deepctl-cmd-models>=0.1.1
|
|
49
|
+
Requires-Dist: deepctl-cmd-speak>=0.0.4
|
|
50
|
+
Requires-Dist: deepctl-cmd-keys>=0.1.0
|
|
51
|
+
Requires-Dist: deepctl-cmd-read>=0.1.0
|
|
52
|
+
Requires-Dist: deepctl-cmd-listen>=0.0.14
|
|
53
|
+
Requires-Dist: deepctl-cmd-requests>=0.1.0
|
|
54
|
+
Requires-Dist: deepctl-cmd-billing>=0.1.0
|
|
55
|
+
Requires-Dist: deepctl-cmd-members>=0.1.0
|
|
56
|
+
Requires-Dist: deepctl-cmd-completion>=0.0.3
|
|
57
|
+
Requires-Dist: deepctl-shared-utils>=0.1.12
|
|
58
|
+
Requires-Dist: deepctl-telemetry>=0.0.6
|
|
59
59
|
Requires-Dist: pydantic>=2.0.0
|
|
60
60
|
Requires-Dist: rich>=13.0.0
|
|
61
61
|
Requires-Dist: httpx>=0.24.0
|
|
@@ -70,13 +70,15 @@ Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
|
70
70
|
Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
|
|
71
71
|
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
72
72
|
Requires-Dist: pytest-mock>=3.10.0; extra == "dev"
|
|
73
|
+
Requires-Dist: pytest-timeout<3,>=2.3.1; extra == "dev"
|
|
73
74
|
Requires-Dist: responses>=0.23.0; extra == "dev"
|
|
74
75
|
Requires-Dist: ruff>=0.8.0; extra == "dev"
|
|
75
76
|
Requires-Dist: mypy>=1.0.0; extra == "dev"
|
|
77
|
+
Requires-Dist: packaging>=23.0; extra == "dev"
|
|
76
78
|
Requires-Dist: types-PyYAML>=6.0.0; extra == "dev"
|
|
77
79
|
Requires-Dist: types-requests>=2.31.0; extra == "dev"
|
|
78
80
|
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
|
|
79
|
-
Requires-Dist: twine>=
|
|
81
|
+
Requires-Dist: twine>=7.0.0; extra == "dev"
|
|
80
82
|
Requires-Dist: build>=0.10.0; extra == "dev"
|
|
81
83
|
Dynamic: license-file
|
|
82
84
|
|
|
@@ -115,8 +117,8 @@ intelligence, and project management directly into your terminal. Aliases:
|
|
|
115
117
|
**macOS / Linux (Homebrew):**
|
|
116
118
|
|
|
117
119
|
```bash
|
|
118
|
-
|
|
119
|
-
brew install deepgram
|
|
120
|
+
# Install and trust only the Deepgram formula.
|
|
121
|
+
brew install deepgram/tap/deepgram
|
|
120
122
|
```
|
|
121
123
|
|
|
122
124
|
Homebrew brings in `ffmpeg` and `portaudio` automatically — `dg listen --mic`, `dg debug probe`, and raw audio piping all work without further setup. To upgrade later: `brew upgrade deepgram`.
|
|
@@ -157,8 +159,8 @@ dg login
|
|
|
157
159
|
# Transcribe an audio file
|
|
158
160
|
dg listen recording.wav
|
|
159
161
|
|
|
160
|
-
# Text-to-speech
|
|
161
|
-
dg speak "Hello from Deepgram" -o hello.
|
|
162
|
+
# Text-to-speech (Flux TTS by default)
|
|
163
|
+
dg speak "Hello from Deepgram" -o hello.wav
|
|
162
164
|
|
|
163
165
|
# Live microphone transcription
|
|
164
166
|
dg listen --mic
|
|
@@ -183,6 +185,10 @@ dg -o json listen standup.mp3 \
|
|
|
183
185
|
# Live microphone with interim (partial) results
|
|
184
186
|
dg listen --mic --model nova-3 --interim
|
|
185
187
|
|
|
188
|
+
# Redact sensitive numbers and spell numbers as digits (files or live)
|
|
189
|
+
# Flux STT (v2) accepts --redact numbers|aggressive_numbers; v1 also pci, ssn, …
|
|
190
|
+
dg listen call.wav --redact numbers --numerals
|
|
191
|
+
|
|
186
192
|
# Raw audio stream from ffmpeg
|
|
187
193
|
ffmpeg -i video.mp4 -f s16le -ar 16000 -ac 1 - \
|
|
188
194
|
| dg listen --encoding linear16
|
|
@@ -214,8 +220,9 @@ dg read earnings.txt --sentiment --summarize --topics
|
|
|
214
220
|
### Text-to-speech
|
|
215
221
|
|
|
216
222
|
```bash
|
|
217
|
-
# Stream directly to a player
|
|
218
|
-
|
|
223
|
+
# Stream directly to a player (Flux TTS streams a WAV; -loglevel error hides
|
|
224
|
+
# ffmpeg's cosmetic end-of-stream notice)
|
|
225
|
+
dg speak "Hello from Deepgram" | ffplay -loglevel error -nodisp -autoexit -
|
|
219
226
|
```
|
|
220
227
|
|
|
221
228
|
### Account & project management
|
|
@@ -255,22 +262,30 @@ cat audio.raw | dg listen --encoding linear16 --sample-rate 16000
|
|
|
255
262
|
|
|
256
263
|
Convert text to natural speech. Supports file output and piping.
|
|
257
264
|
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
265
|
+
By default `dg speak` uses Flux TTS (`flux-alexis-en`) — the Speak v2 WebSocket
|
|
266
|
+
API, which streams and emits raw audio; its `linear16` output is wrapped in a WAV
|
|
267
|
+
container so it is directly playable. Pass an `aura-*` model to use the Speak v1
|
|
268
|
+
batch REST API instead, which supports containerized formats like MP3.
|
|
261
269
|
|
|
262
270
|
```bash
|
|
263
|
-
#
|
|
264
|
-
dg speak "
|
|
265
|
-
dg speak --file script.txt -o output.mp3 -m aura-2-luna-en
|
|
266
|
-
echo "Hello" | dg speak -o greeting.mp3
|
|
267
|
-
dg speak "Stream me" | ffplay -nodisp - # pipe to audio player
|
|
268
|
-
|
|
269
|
-
# Flux TTS (v2, WebSocket streaming)
|
|
270
|
-
dg speak "Hello from Flux" -m flux-alexis-en -o hello.wav
|
|
271
|
+
# Flux TTS (v2, WebSocket streaming) — the default
|
|
272
|
+
dg speak "Hello from Flux" -o hello.wav
|
|
271
273
|
# Piped audio is a streaming WAV; -loglevel error hides ffmpeg's cosmetic
|
|
272
274
|
# end-of-stream notice (the audio is complete).
|
|
273
|
-
dg speak "Hello from Flux"
|
|
275
|
+
dg speak "Hello from Flux" | ffplay -loglevel error -nodisp -autoexit -
|
|
276
|
+
|
|
277
|
+
# Flux TTS streaming controls (flux-* only): --speed 0.85–1.15 (0.05 steps).
|
|
278
|
+
# --expressivity -2..2 is beta; its default 0 is nominal delivery.
|
|
279
|
+
dg speak "A little slower" --speed 0.9 --expressivity 1 -o slow.wav
|
|
280
|
+
|
|
281
|
+
# Aura (v1, batch REST) — opt in with -m aura-*; needed for MP3 output
|
|
282
|
+
dg speak "Welcome to Deepgram" -o welcome.mp3 -m aura-2-asteria-en
|
|
283
|
+
dg speak --file script.txt -o output.mp3 -m aura-2-luna-en
|
|
284
|
+
echo "Hello" | dg speak -o greeting.mp3 -m aura-2-asteria-en
|
|
285
|
+
|
|
286
|
+
# Aura-2 also has Spanish voices (e.g. aura-2-selena-es); run `dg models`
|
|
287
|
+
# for the full, current list.
|
|
288
|
+
dg speak "Hola, bienvenido a Deepgram" -o hola.mp3 -m aura-2-selena-es
|
|
274
289
|
```
|
|
275
290
|
|
|
276
291
|
### Text Intelligence
|
|
@@ -374,7 +389,7 @@ export DEEPGRAM_PROJECT_ID="your-project-id"
|
|
|
374
389
|
|
|
375
390
|
# Non-interactive usage
|
|
376
391
|
dg listen recording.wav
|
|
377
|
-
dg speak "Deploy complete" -o notification.mp3
|
|
392
|
+
dg speak "Deploy complete" -o notification.mp3 -m aura-2-asteria-en
|
|
378
393
|
dg keys --create --comment "ci-key" --scopes member
|
|
379
394
|
dg keys --delete KEY_ID --yes
|
|
380
395
|
dg read --file report.txt --summarize
|
|
@@ -388,6 +403,24 @@ dg usage --last-week -o yaml
|
|
|
388
403
|
When running in a non-TTY environment (pipes, CI, or AI coding tools), the CLI
|
|
389
404
|
automatically switches to structured JSON output with plain-text status messages.
|
|
390
405
|
|
|
406
|
+
### Exit codes
|
|
407
|
+
|
|
408
|
+
Since 0.3.0, `dg` exits non-zero when a command fails — branch on the exit
|
|
409
|
+
code, not on parsing output:
|
|
410
|
+
|
|
411
|
+
| Code | Meaning |
|
|
412
|
+
| --- | --- |
|
|
413
|
+
| `0` | Success |
|
|
414
|
+
| `1` | Error — a failed command, a crash, or a usage error (bad flag, unknown command) |
|
|
415
|
+
| `2` | Cancelled by the user (Ctrl-C, or declining a confirmation prompt) |
|
|
416
|
+
|
|
417
|
+
Note that `dg` reports `2` for an interrupt rather than the shell's
|
|
418
|
+
conventional `130`, so the code is the same whether the cancellation came from
|
|
419
|
+
Ctrl-C or from declining a prompt.
|
|
420
|
+
|
|
421
|
+
If a CI step relied on `dg` always exiting `0` (every command did, before
|
|
422
|
+
0.3.0), it will now fail where it previously passed silently.
|
|
423
|
+
|
|
391
424
|
### Forcing non-interactive mode
|
|
392
425
|
|
|
393
426
|
Three explicit ways to skip every prompt and run with defaults — useful from a
|
|
@@ -431,7 +464,10 @@ dg profiles --list # List profiles
|
|
|
431
464
|
dg profiles --switch staging # Switch profile
|
|
432
465
|
```
|
|
433
466
|
|
|
434
|
-
|
|
467
|
+
For structured output, use `--output json|yaml|table|csv` after leaf commands
|
|
468
|
+
that do not define their own output option, or before any command as a global
|
|
469
|
+
flag: `dg --output json <command>`. `dg speak --output FILE` writes audio to
|
|
470
|
+
`FILE`, so use `dg --output json speak ...` for Speak's structured output.
|
|
435
471
|
|
|
436
472
|
## Telemetry
|
|
437
473
|
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
click>=8.0.0
|
|
2
|
+
deepgram-sdk<8,>=7.7.0
|
|
3
|
+
deepctl-core>=0.2.17
|
|
4
|
+
deepctl-cmd-login>=0.1.18
|
|
5
|
+
deepctl-cmd-projects>=0.2.0
|
|
6
|
+
deepctl-cmd-transcribe>=0.1.12
|
|
7
|
+
deepctl-cmd-usage>=0.2.0
|
|
8
|
+
deepctl-cmd-mcp>=0.1.15
|
|
9
|
+
deepctl-cmd-api>=0.0.2
|
|
10
|
+
deepctl-cmd-debug>=0.1.12
|
|
11
|
+
deepctl-cmd-debug-browser>=0.1.12
|
|
12
|
+
deepctl-cmd-debug-network>=0.1.12
|
|
13
|
+
deepctl-cmd-debug-audio>=0.1.13
|
|
14
|
+
deepctl-cmd-debug-probe>=0.0.2
|
|
15
|
+
deepctl-cmd-debug-toolkit>=0.1.0
|
|
16
|
+
deepctl-cmd-ffprobe>=0.0.2
|
|
17
|
+
deepctl-cmd-update>=0.2.7
|
|
18
|
+
deepctl-cmd-plugin>=0.1.13
|
|
19
|
+
deepctl-cmd-skills>=0.0.8
|
|
20
|
+
deepctl-cmd-init>=0.0.4
|
|
21
|
+
deepctl-cmd-models>=0.1.1
|
|
22
|
+
deepctl-cmd-speak>=0.0.4
|
|
23
|
+
deepctl-cmd-keys>=0.1.0
|
|
24
|
+
deepctl-cmd-read>=0.1.0
|
|
25
|
+
deepctl-cmd-listen>=0.0.14
|
|
26
|
+
deepctl-cmd-requests>=0.1.0
|
|
27
|
+
deepctl-cmd-billing>=0.1.0
|
|
28
|
+
deepctl-cmd-members>=0.1.0
|
|
29
|
+
deepctl-cmd-completion>=0.0.3
|
|
30
|
+
deepctl-shared-utils>=0.1.12
|
|
31
|
+
deepctl-telemetry>=0.0.6
|
|
32
|
+
pydantic>=2.0.0
|
|
33
|
+
rich>=13.0.0
|
|
34
|
+
httpx>=0.24.0
|
|
35
|
+
requests<3.0,>=2.31
|
|
36
|
+
pyjwt>=2.8.0
|
|
37
|
+
keyring>=24.0.0
|
|
38
|
+
pyyaml>=6.0.0
|
|
39
|
+
typer>=0.9.0
|
|
40
|
+
platformdirs>=3.0.0
|
|
41
|
+
|
|
42
|
+
[dev]
|
|
43
|
+
pytest>=7.0.0
|
|
44
|
+
pytest-asyncio>=0.21.0
|
|
45
|
+
pytest-cov>=4.0.0
|
|
46
|
+
pytest-mock>=3.10.0
|
|
47
|
+
pytest-timeout<3,>=2.3.1
|
|
48
|
+
responses>=0.23.0
|
|
49
|
+
ruff>=0.8.0
|
|
50
|
+
mypy>=1.0.0
|
|
51
|
+
packaging>=23.0
|
|
52
|
+
types-PyYAML>=6.0.0
|
|
53
|
+
types-requests>=2.31.0
|
|
54
|
+
pre-commit>=3.0.0
|
|
55
|
+
twine>=7.0.0
|
|
56
|
+
build>=0.10.0
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
click>=8.0.0
|
|
2
|
-
deepgram-sdk>=7.5.0
|
|
3
|
-
deepctl-core>=0.1.10
|
|
4
|
-
deepctl-cmd-login>=0.1.10
|
|
5
|
-
deepctl-cmd-projects>=0.1.10
|
|
6
|
-
deepctl-cmd-transcribe>=0.1.10
|
|
7
|
-
deepctl-cmd-usage>=0.1.10
|
|
8
|
-
deepctl-cmd-mcp>=0.1.10
|
|
9
|
-
deepctl-cmd-api>=0.0.1
|
|
10
|
-
deepctl-cmd-debug>=0.1.10
|
|
11
|
-
deepctl-cmd-debug-browser>=0.1.10
|
|
12
|
-
deepctl-cmd-debug-network>=0.1.10
|
|
13
|
-
deepctl-cmd-debug-audio>=0.1.10
|
|
14
|
-
deepctl-cmd-debug-probe>=0.0.1
|
|
15
|
-
deepctl-cmd-debug-toolkit>=0.0.1
|
|
16
|
-
deepctl-cmd-ffprobe>=0.0.1
|
|
17
|
-
deepctl-cmd-update>=0.1.10
|
|
18
|
-
deepctl-cmd-plugin>=0.1.10
|
|
19
|
-
deepctl-cmd-skills>=0.0.1
|
|
20
|
-
deepctl-cmd-init>=0.0.1
|
|
21
|
-
deepctl-cmd-models>=0.0.1
|
|
22
|
-
deepctl-cmd-speak>=0.0.1
|
|
23
|
-
deepctl-cmd-keys>=0.0.1
|
|
24
|
-
deepctl-cmd-read>=0.0.1
|
|
25
|
-
deepctl-cmd-listen>=0.0.1
|
|
26
|
-
deepctl-cmd-requests>=0.0.1
|
|
27
|
-
deepctl-cmd-billing>=0.0.1
|
|
28
|
-
deepctl-cmd-members>=0.0.1
|
|
29
|
-
deepctl-cmd-completion>=0.0.1
|
|
30
|
-
deepctl-shared-utils>=0.1.10
|
|
31
|
-
deepctl-telemetry>=0.0.1
|
|
32
|
-
pydantic>=2.0.0
|
|
33
|
-
rich>=13.0.0
|
|
34
|
-
httpx>=0.24.0
|
|
35
|
-
requests<3.0,>=2.31
|
|
36
|
-
pyjwt>=2.8.0
|
|
37
|
-
keyring>=24.0.0
|
|
38
|
-
pyyaml>=6.0.0
|
|
39
|
-
typer>=0.9.0
|
|
40
|
-
platformdirs>=3.0.0
|
|
41
|
-
|
|
42
|
-
[dev]
|
|
43
|
-
pytest>=7.0.0
|
|
44
|
-
pytest-asyncio>=0.21.0
|
|
45
|
-
pytest-cov>=4.0.0
|
|
46
|
-
pytest-mock>=3.10.0
|
|
47
|
-
responses>=0.23.0
|
|
48
|
-
ruff>=0.8.0
|
|
49
|
-
mypy>=1.0.0
|
|
50
|
-
types-PyYAML>=6.0.0
|
|
51
|
-
types-requests>=2.31.0
|
|
52
|
-
pre-commit>=3.0.0
|
|
53
|
-
twine>=4.0.0
|
|
54
|
-
build>=0.10.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|