Commit 3a4e8a9
authored
docs: fix dg listen examples and drop deprecated dg transcribe references (#53)
## Summary
Three doc bugs surfaced during Hasan's end-to-end command testing for
the launch blog.
| Bug | Where | Cause |
|---|---|---|
| `dg transcribe` references in user-facing docs |
`web/src/pages/index.astro`, `README.md`, `AGENTS.md` | Earlier commit
[`4676d34`](4676d34) replaced
some `dg transcribe` references with `dg listen` but missed several. `dg
transcribe` is now a hidden, deprecated alias for `dg listen` (kept for
backwards compat) and shouldn't be advertised. |
| `dg listen ... -o json` rejected by Click | landing page, `README.md`,
`dg listen --help` examples, listen `agent_help` text | `-o`/`--output`
is defined on the cli group at
[`src/deepctl/main.py:127`](https://github.com/deepgram/cli/blob/main/src/deepctl/main.py#L127),
not on subcommands. Correct invocation is `dg -o json listen audio.mp3`.
The wrong-position form 401s with "no such option: -o". |
| `jq '.full_result.results.channels[0]...'` returns `null` | `dg listen
--help` example | The listen command's JSON output
([`command.py:1062`](https://github.com/deepgram/cli/blob/main/packages/deepctl-cmd-listen/src/deepctl_cmd_listen/command.py#L1062))
writes `result.full_result` directly to stdout, so the actual top level
is `.results.channels[0]...`. The `.full_result.` prefix in the example
was wrong. |
Bugs (2) and (3) compound: running the example verbatim (`dg listen
audio.mp3 -o json | jq '.full_result.results...'`) fails twice. Click
rejects `-o` at the subcommand position, jq parses the failure output
and returns null, and the user concludes the CLI is broken.
## What changes
- `README.md` — 4 example snippets (`dg transcribe` → `dg listen`, `-o
json` repositioned)
- `AGENTS.md` — 1 flow example. Catalog row updated: replaced the `dg
transcribe` row with the canonical `dg listen` row, with a note that `dg
transcribe` is a hidden deprecated alias.
- `web/src/pages/index.astro` — 6 examples across the JSON-LD FAQ, hero,
CLI command catalog, and JSON-pipeline demo strip.
- `packages/deepctl-cmd-listen/src/deepctl_cmd_listen/command.py` — the
entry in `examples` (jq path + flag position) and the `agent_help`
string (`-o json` repositioned, alias deprecation note clarified).
No code-logic changes. The fix is purely the documented invocations and
jq path.
## Verification
- `ruff format --check src/ packages/*/src` clean
- `ruff check src/ packages/*/src` clean
- `mypy --strict src/ packages/*/src` clean (112 source files)
- Grep sweep for `dg transcribe` returns only intentional
alias-documentation lines (the catalog row noting the alias, the
`agent_help` string mentioning the alias, the listen module's docstring
noting transcribe is registered as an alias)
- Grep sweep for `listen ... -o json` returns nothing in the
wrong-position form
## Out of scope
The listen command's JSON output structure is what it is, but worth
flagging for a future pass: when `result.full_result` is set we strip
the wrapping `ListenResult` model and emit the raw Deepgram response.
When `full_result` is `None` (e.g. live caption mode after streaming) we
emit the wrapping model. So the JSON shape isn't 100% consistent across
modes. Not changing here, but worth tracking.
## Companion follow-up
The `dg transcribe` package (`deepctl-cmd-transcribe`) remains in the
repo as a deprecated, hidden alias. We can drop it in a future major
release. Not part of this PR.1 parent 2fab886 commit 3a4e8a9
4 files changed
Lines changed: 16 additions & 15 deletions
File tree
- packages/deepctl-cmd-listen/src/deepctl_cmd_listen
- web/src/pages
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
601 | 601 | | |
602 | 602 | | |
603 | 603 | | |
604 | | - | |
| 604 | + | |
605 | 605 | | |
606 | 606 | | |
607 | 607 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
| 166 | + | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
280 | 280 | | |
281 | 281 | | |
282 | 282 | | |
283 | | - | |
| 283 | + | |
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
99 | 100 | | |
100 | 101 | | |
101 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
370 | 370 | | |
371 | 371 | | |
372 | 372 | | |
373 | | - | |
| 373 | + | |
374 | 374 | | |
375 | 375 | | |
376 | 376 | | |
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
653 | | - | |
| 653 | + | |
654 | 654 | | |
655 | 655 | | |
656 | 656 | | |
| |||
660 | 660 | | |
661 | 661 | | |
662 | 662 | | |
663 | | - | |
| 663 | + | |
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
| |||
776 | 776 | | |
777 | 777 | | |
778 | 778 | | |
779 | | - | |
| 779 | + | |
780 | 780 | | |
781 | 781 | | |
782 | 782 | | |
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
| 815 | + | |
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| |||
909 | 909 | | |
910 | 910 | | |
911 | 911 | | |
912 | | - | |
| 912 | + | |
913 | 913 | | |
914 | 914 | | |
915 | 915 | | |
| |||
0 commit comments