Skip to content

docs: fix dg listen examples and drop deprecated dg transcribe references#53

Merged
lukeocodes merged 1 commit intomainfrom
fix/landing-page-and-listen-help-examples
May 4, 2026
Merged

docs: fix dg listen examples and drop deprecated dg transcribe references#53
lukeocodes merged 1 commit intomainfrom
fix/landing-page-and-listen-help-examples

Conversation

@lukeocodes
Copy link
Copy Markdown
Member

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 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, 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) 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 transcribedg 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.

…nces

Three doc bugs surfaced by Hasan during launch-blog end-to-end testing.

1. dg transcribe references on cli.deepgram.com, root README, and AGENTS.md.
   dg transcribe is a hidden, deprecated alias for the unified dg listen
   command and still works for backwards compat, but the documented
   examples should use dg listen. Earlier commit 4676d34 did partial
   cleanup; this finishes it.

2. -o/--output is defined on the cli group, not on subcommands, so
   `dg listen audio.mp3 -o json` is rejected by Click. The flag has to
   come before the subcommand: `dg -o json listen audio.mp3`. Examples
   in the listen --help text, README, AGENTS.md, and landing page all
   had the flag in the wrong position.

3. The example in dg listen --help used jq path
   `.full_result.results.channels[0]...`, but the JSON output (see
   listen command.py output_result) writes result.full_result directly
   to stdout, so the actual top level is `.results.channels[0]...`.
   The bogus `.full_result.` prefix returned null when run verbatim.

Files touched:

- README.md: 4 example snippets
- AGENTS.md: 1 flow example, plus the command-catalog row (replaced the
  dg transcribe row with the canonical dg listen row, noting the alias)
- web/src/pages/index.astro: 6 examples spanning the JSON-LD FAQ, hero,
  CLI catalog, and the "JSON pipeline" demo strip
- packages/deepctl-cmd-listen/src/deepctl_cmd_listen/command.py: the
  examples list entry and the agent_help string

No code-logic changes. Lint clean: ruff format --check, ruff check,
mypy --strict against src/ + packages/*/src all pass.
@lukeocodes lukeocodes merged commit 3a4e8a9 into main May 4, 2026
38 checks passed
@lukeocodes lukeocodes deleted the fix/landing-page-and-listen-help-examples branch May 4, 2026 21:53
@github-actions github-actions Bot mentioned this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant