deepctl 0.2.2__tar.gz → 0.2.4__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.4/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-present Deepgram, Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: deepctl
3
- Version: 0.2.2
3
+ Version: 0.2.4
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>
@@ -24,6 +24,7 @@ Classifier: Topic :: Multimedia :: Sound/Audio :: Speech
24
24
  Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
25
25
  Requires-Python: >=3.10
26
26
  Description-Content-Type: text/markdown
27
+ License-File: LICENSE
27
28
  Requires-Dist: click>=8.0.0
28
29
  Requires-Dist: deepgram-sdk>=6.0.0rc2
29
30
  Requires-Dist: deepctl-core>=0.1.10
@@ -74,171 +75,298 @@ Requires-Dist: types-requests>=2.31.0; extra == "dev"
74
75
  Requires-Dist: pre-commit>=3.0.0; extra == "dev"
75
76
  Requires-Dist: twine>=4.0.0; extra == "dev"
76
77
  Requires-Dist: build>=0.10.0; extra == "dev"
78
+ Dynamic: license-file
79
+
80
+ # Deepgram CLI
81
+
82
+ [![Test](https://github.com/deepgram/cli/actions/workflows/test.yml/badge.svg)](https://github.com/deepgram/cli/actions/workflows/test.yml)
83
+ [![Version](https://img.shields.io/pypi/v/deepctl)](https://pypi.org/project/deepctl/)
84
+ [![Python](https://img.shields.io/pypi/pyversions/deepctl)](https://pypi.org/project/deepctl/)
85
+ [![License](https://img.shields.io/github/license/deepgram/cli)](https://github.com/deepgram/cli/blob/main/LICENSE)
86
+ ```sh
87
+ Usage: dg [OPTIONS] COMMAND [ARGS]...
88
+
89
+ ████████████████
90
+ ██████████████████
91
+ ████████████████████
92
+ █████████████████████
93
+ ███████ ████████
94
+ ███████ ███████
95
+ ████████
96
+ ███████████████
97
+ ████████████████
98
+ ████████████████
99
+ ████████████████
100
+
101
+ deepctl — Official Deepgram CLI STT · TTS · Audio Intelligence
102
+ ```
77
103
 
78
- # deepctl
79
-
80
- > [!WARNING]
81
- > **Alpha Software**: This CLI is experimental and under active development.
104
+ The official Deepgram CLI brings speech-to-text, text-to-speech, audio
105
+ intelligence, and project management directly into your terminal. Aliases:
106
+ `deepctl`, `deepgram`, `dg`.
82
107
 
83
- Official Deepgram CLI. Modular Python package with plugin system.
108
+ ## Installation
84
109
 
85
- ## Development
110
+ ### Quick Install
86
111
 
87
- ### Setup
112
+ **macOS / Linux:**
88
113
 
89
114
  ```bash
90
- git clone https://github.com/deepgram/cli && cd cli
91
- uv sync
115
+ curl -fsSL https://deepgram.com/install.sh | sh
116
+ ```
117
+
118
+ **Windows (PowerShell):**
119
+
120
+ ```powershell
121
+ iwr https://deepgram.com/install.ps1 -useb | iex
92
122
  ```
93
123
 
94
- ### Run CLI
124
+ ### Package Managers
95
125
 
96
126
  ```bash
97
- uv run deepctl --help
98
- uv run deepctl login
99
- uv run deepctl transcribe audio.wav
127
+ pip install deepctl # pip
128
+ uv tool install deepctl # uv
129
+ pipx install deepctl # pipx
100
130
  ```
101
131
 
102
- ### Development Commands
132
+ ### Try Without Installing
103
133
 
104
134
  ```bash
105
- make dev # Format, lint, test
106
- make check # Format, lint, typecheck (no tests)
107
- make test # Run tests
135
+ uvx deepctl --help
136
+ pipx run deepctl --help
108
137
  ```
109
138
 
110
- ### Requirements
139
+ ## Getting Started
111
140
 
112
- - Python 3.10+
113
- - uv package manager
114
- - Cross-platform: Linux, Windows, macOS
141
+ ```bash
142
+ # Authenticate with Deepgram
143
+ dg login
115
144
 
116
- ### Architecture
145
+ # Transcribe an audio file
146
+ dg transcribe recording.wav
117
147
 
118
- <!-- BEGIN:architecture -->
148
+ # Text-to-speech
149
+ dg speak "Hello from Deepgram" -o hello.mp3
150
+
151
+ # Live microphone transcription
152
+ dg listen --mic
153
+
154
+ # Analyze text for sentiment and topics
155
+ dg read "The product is amazing" --sentiment --topics
119
156
  ```
120
- cli/
121
- ├── src/deepctl/ # Main CLI entry point
122
- ├── packages/
123
- │ ├── deepctl-cmd-api/ # API command for deepctl
124
- │ ├── deepctl-cmd-billing/ # Billing command for deepctl
125
- │ ├── deepctl-cmd-debug/ # Debug command group for deepctl
126
- │ ├── deepctl-cmd-debug-audio/ # Audio debug subcommand for deepctl
127
- │ ├── deepctl-cmd-debug-browser/ # Browser debug subcommand for deepctl
128
- │ ├── deepctl-cmd-debug-network/ # Network debug subcommand for deepctl
129
- │ ├── deepctl-cmd-debug-probe/ # Debug probe subcommand for deepctl — live ffprobe analysis during streaming
130
- │ ├── deepctl-cmd-ffprobe/ # FFprobe configuration command for deepctl
131
- │ ├── deepctl-cmd-init/ # Init command for deepctl — scaffold Deepgram starter apps
132
- │ ├── deepctl-cmd-keys/ # API keys management command for deepctl
133
- │ ├── deepctl-cmd-listen/ # Listen (live speech-to-text) command for deepctl
134
- │ ├── deepctl-cmd-login/ # Login command for deepctl
135
- │ ├── deepctl-cmd-mcp/ # MCP proxy command for deepctl — connects to Deepgram's developer API
136
- │ ├── deepctl-cmd-members/ # Members management command for deepctl
137
- │ ├── deepctl-cmd-models/ # Models command for deepctl
138
- │ ├── deepctl-cmd-plugin/ # Plugin management command for deepctl
139
- │ ├── deepctl-cmd-projects/ # Projects command for deepctl
140
- │ ├── deepctl-cmd-read/ # Read (text intelligence) command for deepctl
141
- │ ├── deepctl-cmd-requests/ # Requests history command for deepctl
142
- │ ├── deepctl-cmd-skills/ # AI coding assistant skill management for deepctl
143
- │ ├── deepctl-cmd-speak/ # Speak (text-to-speech) command for deepctl
144
- │ ├── deepctl-cmd-transcribe/ # Transcribe command for deepctl
145
- │ ├── deepctl-cmd-update/ # Update command for deepctl
146
- │ ├── deepctl-cmd-usage/ # Usage command for deepctl
147
- │ ├── deepctl-core/ # Core components for deepctl
148
- │ ├── deepctl-plugin-example/ # Example plugin for deepctl
149
- │ └── deepctl-shared-utils/ # Shared utilities for deepctl
150
- ├── tests/ # Integration tests
151
- └── Makefile # Development tasks
157
+
158
+ ## Features
159
+
160
+ ### Speech-to-Text
161
+
162
+ Transcribe audio files, URLs, or live microphone input.
163
+
164
+ ```bash
165
+ dg transcribe meeting.wav --diarize --smart-format
166
+ dg transcribe https://example.com/audio.mp3 --model nova-3
167
+ dg listen --mic --model nova-3 --language en-US
168
+ cat audio.raw | dg listen --encoding linear16 --sample-rate 16000
152
169
  ```
153
- <!-- END:architecture -->
154
170
 
155
- ### Plugin Development
171
+ ### Text-to-Speech
172
+
173
+ Convert text to natural speech. Supports file output and piping.
174
+
175
+ ```bash
176
+ dg speak "Welcome to Deepgram" -o welcome.mp3
177
+ dg speak --file script.txt -o output.mp3 -m aura-2-luna-en
178
+ echo "Hello" | dg speak -o greeting.mp3
179
+ dg speak "Stream me" | ffplay -nodisp - # pipe to audio player
180
+ ```
156
181
 
157
- ```python
158
- from deepctl_core.base_command import BaseCommand
182
+ ### Text Intelligence
159
183
 
160
- class MyCommand(BaseCommand):
161
- name = "mycommand"
162
- help = "My custom command"
184
+ Analyze text for sentiment, summaries, topics, and intents.
163
185
 
164
- def handle(self, config, auth_manager, client, **kwargs):
165
- pass
186
+ ```bash
187
+ dg read "Customer called about billing" --sentiment --summarize
188
+ dg read --file article.txt --topics --intents
189
+ cat feedback.txt | dg read --sentiment
166
190
  ```
167
191
 
168
- Register your command in `pyproject.toml` under the `deepctl.plugins` entry point group:
192
+ ### Project Management
193
+
194
+ Manage your Deepgram account from the terminal.
169
195
 
170
- ```toml
171
- [project.entry-points."deepctl.plugins"]
172
- mycommand = "my_plugin.command:MyCommand"
196
+ ```bash
197
+ dg projects --list # List projects
198
+ dg keys --list # List API keys
199
+ dg keys --create --comment "staging" # Create API key
200
+ dg members # List team members
201
+ dg members --invite user@co.com # Invite member
202
+ dg usage --last-month # View usage stats
203
+ dg billing # Check balances
204
+ dg requests --limit 20 --status failed # Request history
205
+ dg models --type tts # List available models
173
206
  ```
174
207
 
175
- See [`packages/deepctl-plugin-example`](packages/deepctl-plugin-example).
208
+ ### Direct API Access
176
209
 
177
- ### Testing
210
+ Make authenticated requests to any Deepgram endpoint.
178
211
 
179
- - `tests/` - Integration tests
180
- - `packages/*/tests/unit/` - Unit tests
181
- - Runs on Python 3.10-3.14, Linux/Windows/macOS
212
+ ```bash
213
+ dg api /v1/projects
214
+ dg api /v1/projects -X POST -f name="New Project"
215
+ dg api /v1/listen -X POST --input audio.wav --jq '.results'
216
+ ```
182
217
 
183
- ## Release
218
+ ### Debugging Tools
184
219
 
185
- Merging conventional commits to `main` triggers [release-please](https://github.com/googleapis/release-please) to open a release PR. Merging that PR creates a `v*` tag, which triggers the PyPI publish workflow. All packages are version-locked.
220
+ Diagnose audio, network, and browser issues.
186
221
 
187
- ## Installation
222
+ ```bash
223
+ dg debug audio --file recording.wav # Analyze audio compatibility
224
+ dg debug network --verbose # Test connectivity to Deepgram
225
+ dg debug probe --port 3100 # Live stream audio analysis
226
+ ```
188
227
 
189
- ### Quick Install
228
+ ### MCP Server
190
229
 
191
- **macOS / Linux:**
230
+ Connect Deepgram tools to AI coding assistants (Claude Code, Cursor, etc.).
192
231
 
193
232
  ```bash
194
- curl -fsSL https://deepgram.com/install.sh | sh
233
+ dg mcp # Start MCP server (stdio)
234
+ dg mcp --transport sse --port 8000 # SSE transport
195
235
  ```
196
236
 
197
- **Windows (PowerShell):**
237
+ Add to your editor's MCP config:
198
238
 
199
- ```powershell
200
- iwr https://deepgram.com/install.ps1 -useb | iex
239
+ ```json
240
+ {
241
+ "mcpServers": {
242
+ "deepgram": {
243
+ "type": "stdio",
244
+ "command": "dg",
245
+ "args": ["mcp"]
246
+ }
247
+ }
248
+ }
201
249
  ```
202
250
 
203
- ### Install Options
251
+ ### AI Tool Integration
252
+
253
+ Automatically detect and configure AI coding assistants with Deepgram skills.
204
254
 
205
255
  ```bash
206
- # Install a specific version
207
- curl -fsSL https://deepgram.com/install.sh | sh -s -- v0.2.1
256
+ dg skills status # Detect AI tools
257
+ dg skills setup # Interactive setup wizard
258
+ dg skills install --all # Install for all detected tools
259
+ ```
260
+
261
+ ### Starter Apps
208
262
 
209
- # Force reinstall over existing installation
210
- curl -fsSL https://deepgram.com/install.sh | sh -s -- --force
263
+ Scaffold a new project from Deepgram templates.
211
264
 
212
- # Both
213
- curl -fsSL https://deepgram.com/install.sh | sh -s -- --force v0.2.1
265
+ ```bash
266
+ dg init --list # Browse templates
267
+ dg init node-live-transcription # Clone and set up
214
268
  ```
215
269
 
216
- **Windows (PowerShell):**
270
+ ## CI / Automation
217
271
 
218
- ```powershell
219
- # Install a specific version
220
- $env:DEEPCTL_VERSION='0.2.1'; iwr https://deepgram.com/install.ps1 -useb | iex
272
+ Every command is CI-friendly. Authentication works via environment variables,
273
+ all interactive prompts have flag-based alternatives, and destructive operations
274
+ require explicit `--yes`.
221
275
 
222
- # Force reinstall
223
- $env:DEEPCTL_FORCE='1'; iwr https://deepgram.com/install.ps1 -useb | iex
276
+ ```bash
277
+ # CI authentication
278
+ export DEEPGRAM_API_KEY="your-key"
279
+ export DEEPGRAM_PROJECT_ID="your-project-id"
280
+
281
+ # Non-interactive usage
282
+ dg transcribe recording.wav
283
+ dg speak "Deploy complete" -o notification.mp3
284
+ dg keys --create --comment "ci-key" --scopes member
285
+ dg keys --delete KEY_ID --yes
286
+ dg read --file report.txt --summarize
287
+
288
+ # Output formats for scripting
289
+ dg projects --list -o json
290
+ dg keys --list -o csv
291
+ dg usage --last-week -o yaml
224
292
  ```
225
293
 
226
- ### Other Methods
294
+ When running in a non-TTY environment (pipes, CI, or AI coding tools), the CLI
295
+ automatically switches to structured JSON output with plain-text status messages.
296
+
297
+ ## Plugins
298
+
299
+ Extend the CLI with custom commands.
227
300
 
228
301
  ```bash
229
- uv tool install deepctl
230
- pip install deepctl
231
- pipx install deepctl
302
+ dg plugin search deepctl- # Find plugins
303
+ dg plugin install <package> # Install
304
+ dg plugin list # List installed
305
+ dg plugin remove <package> # Remove
232
306
  ```
233
307
 
234
- ### Try Without Installing
308
+ Create your own — see the [plugin example](packages/deepctl-plugin-example).
309
+
310
+ ## Configuration
311
+
312
+ **Priority:** CLI flags > environment variables > profile config > project config
235
313
 
236
314
  ```bash
237
- uv run deepctl --help
238
- pipx run deepctl --help
315
+ dg login # Interactive or --api-key
316
+ dg login --profile staging --api-key SK # Named profiles
317
+ dg profiles --list # List profiles
318
+ dg profiles --switch staging # Switch profile
319
+ ```
320
+
321
+ Output format on any command: `--output json|yaml|table|csv`
322
+
323
+ ## Development
324
+
325
+ ```bash
326
+ git clone https://github.com/deepgram/cli && cd cli
327
+ uv sync --group dev
328
+ make dev # Format + lint + test
329
+ make check # Format + lint + typecheck (no tests)
239
330
  ```
240
331
 
241
- ## Usage
332
+ ### Architecture
333
+
334
+ <!-- BEGIN:architecture -->
335
+ ```
336
+ cli/
337
+ ├── src/deepctl/ # Main CLI entry point
338
+ ├── packages/
339
+ │ ├── deepctl-cmd-api/ # API command for deepctl
340
+ │ ├── deepctl-cmd-billing/ # Billing command for deepctl
341
+ │ ├── deepctl-cmd-debug/ # Debug command group for deepctl
342
+ │ ├── deepctl-cmd-debug-audio/ # Audio debug subcommand for deepctl
343
+ │ ├── deepctl-cmd-debug-browser/ # Browser debug subcommand for deepctl
344
+ │ ├── deepctl-cmd-debug-network/ # Network debug subcommand for deepctl
345
+ │ ├── deepctl-cmd-debug-probe/ # Debug probe subcommand for deepctl — live ffprobe analysis during streaming
346
+ │ ├── deepctl-cmd-ffprobe/ # FFprobe configuration command for deepctl
347
+ │ ├── deepctl-cmd-init/ # Init command for deepctl — scaffold Deepgram starter apps
348
+ │ ├── deepctl-cmd-keys/ # API keys management command for deepctl
349
+ │ ├── deepctl-cmd-listen/ # Listen (live speech-to-text) command for deepctl
350
+ │ ├── deepctl-cmd-login/ # Login command for deepctl
351
+ │ ├── deepctl-cmd-mcp/ # MCP proxy command for deepctl — connects to Deepgram's developer API
352
+ │ ├── deepctl-cmd-members/ # Members management command for deepctl
353
+ │ ├── deepctl-cmd-models/ # Models command for deepctl
354
+ │ ├── deepctl-cmd-plugin/ # Plugin management command for deepctl
355
+ │ ├── deepctl-cmd-projects/ # Projects command for deepctl
356
+ │ ├── deepctl-cmd-read/ # Read (text intelligence) command for deepctl
357
+ │ ├── deepctl-cmd-requests/ # Requests history command for deepctl
358
+ │ ├── deepctl-cmd-skills/ # AI coding assistant skill management for deepctl
359
+ │ ├── deepctl-cmd-speak/ # Speak (text-to-speech) command for deepctl
360
+ │ ├── deepctl-cmd-transcribe/ # Transcribe command for deepctl
361
+ │ ├── deepctl-cmd-update/ # Update command for deepctl
362
+ │ ├── deepctl-cmd-usage/ # Usage command for deepctl
363
+ │ ├── deepctl-core/ # Core components for deepctl
364
+ │ ├── deepctl-plugin-example/ # Example plugin for deepctl
365
+ │ └── deepctl-shared-utils/ # Shared utilities for deepctl
366
+ ├── tests/ # Integration tests
367
+ └── Makefile # Development tasks
368
+ ```
369
+ <!-- END:architecture -->
242
370
 
243
371
  ### Commands
244
372
 
@@ -273,71 +401,7 @@ pipx run deepctl --help
273
401
  | `deepctl usage` | Usage command for deepctl |
274
402
  <!-- END:commands -->
275
403
 
276
- ### Aliases
277
-
278
- - `deepctl` (primary)
279
- - `deepgram`
280
- - `dg`
281
-
282
- ### Plugins
283
-
284
- ```bash
285
- deepctl plugin search # Browse available plugins
286
- deepctl plugin install <package> # Install a plugin
287
- deepctl plugin list -v # List installed plugins (verbose)
288
- deepctl plugin remove <package> # Remove a plugin
289
- deepctl plugin update <package> # Update a plugin
290
- ```
291
-
292
- Plugin installation adapts to how deepctl was installed:
293
-
294
- | Install method | Plugin strategy |
295
- |---|---|
296
- | `pip` / `uv` (venv) | Installs into current environment |
297
- | `pipx` | `pipx inject deepctl <plugin>` |
298
- | `uv tool` | `uv tool install deepctl --with <plugin>` |
299
- | Homebrew / system / binary | Isolated venv at `~/.deepctl/plugins/venv/` |
300
- | Development (editable) | Installs into current environment |
301
- | `uvx` / `pipx run` | Not supported (ephemeral) |
302
-
303
- Plugins installed into the isolated venv are automatically discovered and loaded on every CLI invocation.
304
-
305
- ### Configuration
306
-
307
- Priority: CLI args > env vars > user config (`~/.config/deepctl/config.yaml` on Linux, `~/Library/Application Support/deepctl/config.yaml` on macOS) > `./deepgram.yaml`
308
-
309
- ### Output Formats
310
-
311
- ```bash
312
- deepctl transcribe audio.wav --output json|yaml|table|csv
313
- ```
314
-
315
- ### MCP Server
316
-
317
- Use `deepctl mcp` to connect Deepgram's developer tools to your AI code editor.
318
-
319
- ```bash
320
- # Login first
321
- deepctl login
322
- ```
323
-
324
- Add to your editor's MCP config (Claude Code `.mcp.json`, Cursor `.cursor/mcp.json`, etc.):
325
-
326
- ```json
327
- {
328
- "mcpServers": {
329
- "deepgram": {
330
- "type": "stdio",
331
- "command": "uvx",
332
- "args": ["deepctl", "mcp"]
333
- }
334
- }
335
- }
336
- ```
337
-
338
- See [`deepctl-cmd-mcp`](packages/deepctl-cmd-mcp) for full setup instructions including Cursor, Windsurf, pipx, and local development.
339
-
340
- ## Packages
404
+ ### Packages
341
405
 
342
406
  <!-- BEGIN:packages -->
343
407
  | Package | Description |
@@ -371,16 +435,31 @@ See [`deepctl-cmd-mcp`](packages/deepctl-cmd-mcp) for full setup instructions in
371
435
  | [`deepctl-shared-utils`](packages/deepctl-shared-utils) | Shared utilities for deepctl |
372
436
  <!-- END:packages -->
373
437
 
438
+ ## Release
439
+
440
+ Merging [conventional commits](https://www.conventionalcommits.org/) to `main`
441
+ triggers [release-please](https://github.com/googleapis/release-please) to open
442
+ a release PR. Merging that PR creates tags and publishes all changed packages to
443
+ PyPI. Each package is versioned independently.
444
+
445
+ ## Requirements
446
+
447
+ - Python 3.10+
448
+ - Cross-platform: Linux, Windows, macOS
449
+
374
450
  ## Contributing
375
451
 
376
- 1. Fork repository
377
- 2. Run `make dev` (formats, lints, tests)
378
- 3. Add tests for changes
379
- 4. Submit pull request
452
+ 1. Fork the repository
453
+ 2. `uv sync --group dev`
454
+ 3. `make dev` (formats, lints, tests)
455
+ 4. Submit a pull request
456
+
457
+ See [AGENTS.md](AGENTS.md) for detailed architecture and conventions.
380
458
 
381
459
  ## Links
382
460
 
383
461
  - [Documentation](https://developers.deepgram.com/docs/cli)
462
+ - [API Reference](https://developers.deepgram.com/reference)
384
463
  - [Discord](https://discord.gg/deepgram)
385
464
  - [Issues](https://github.com/deepgram/cli/issues)
386
465