Skip to content

fix: accurate --deployment help, aliases, and --list for generate-docs - #1040

Merged
u9g merged 3 commits into
jason/generate-docsfrom
jason/generate-docs-review
Oct 15, 2026
Merged

u9g merged 3 commits into
jason/generate-docsfrom
jason/generate-docs-review

Conversation

@u9g

@u9g u9g commented Oct 15, 2026

Copy link
Copy Markdown
Contributor

Stacked on #1033. Addresses review feedback on the docs.livekit.io CLI reference that lk generate-docs produces (livekit/web#6531):

  • --deployment on agent delete and agent promote: both used the shared flag, whose help says "Defaults to production". That's wrong for both: agent delete without --deployment deletes the whole agent, including production, and agent promote without it fails with "cannot promote production deployment". Each now has its own flag with accurate help, and promote marks it required, so urfave rejects a missing flag before any API call.
  • Command aliases: generate-docs dropped them, so the reference lost lk agent tail and lk agent destroy. Each alias now gets its own usage line, and the options label names both (Options for \logs`/`tail``), matching how the reference wrote them by hand.
  • generate-docs --list [command path...]: prints every command below a path that the reference documents: commands that are run, and command groups that take their own options. docs.livekit.io generates one partial per listed command, so new commands appear in its release PR instead of being skipped silently. That's how the reference missed lk agent simulate audio's --background-noise, --low-quality-microphone, and --packet-loss.

How to verify

make build   # or: go build -tags portaudio_system -o bin/lk ./cmd/lk
bin/lk agent delete --help          # --deployment: "If unset, deletes the entire agent, including production."
bin/lk agent promote --id CA_x      # Required flag "deployment" not set
bin/lk generate-docs agent logs     # lk agent logs ... # or lk agent tail ...
bin/lk generate-docs --list agent   # includes agent simulate audio

go test -tags portaudio_system ./cmd/lk/ passes.

u9g added 3 commits October 15, 2026 10:23
agent delete deletes the whole agent when --deployment is unset, and agent
promote rejects an unset --deployment, so the shared flag's "Defaults to
production" was wrong for both. They now have their own flag, and promote
requires it.
Each alias gets its own usage line and joins the options label, the way the
docs.livekit.io CLI reference wrote them by hand (lk agent logs / lk agent tail).
Prints every command under a path that the reference documents: commands that
are run, and groups with their own options. docs.livekit.io generates a partial
for each, so a new command can't go missing from the reference.
@u9g

u9g commented Oct 15, 2026

Copy link
Copy Markdown
Contributor Author

lk agent delete --help and lk agent promote --help describing their own --deployment, lk agent promote rejecting a missing --deployment, lk generate-docs agent logs listing the lk agent tail alias, lk generate-docs --list agent listing every simulate subcommand, and lk generate-docs agent simulate audio printing the audio-only flags.

lk-generate-docs-fixes.mp4

@u9g
u9g merged commit 8d9fd62 into jason/generate-docs Oct 15, 2026
9 checks passed
@u9g
u9g deleted the jason/generate-docs-review branch October 15, 2026 14:40
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