Skip to content

fix: correct help text and dead flag references in several commands - #998

Merged
bcherry merged 4 commits into
mainfrom
bcherry/cli-help-fixes
Sep 25, 2026
Merged

bcherry merged 4 commits into
mainfrom
bcherry/cli-help-fixes

Conversation

@bcherry

@bcherry bcherry commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Context

While writing the full CLI reference docs (livekit/web#6370), several commands turned out to have help text that doesn't match their behavior, or flags that the code reads but never defines. A few of these are real bugs, not just wording:

  • egress update-layout shows a positional ID in its usage line, but --id is required, so update-layout ID fails with Required flag "id" not set.
  • egress test-template names its flag --base-url (e.g. https://recorder.livekit.io/#), so cmd.String("base-url") always returned "".
  • token create --room-configuration was ignored after Add agent dispatch commands #473, because the code switched to reading an undefined room-preset.
  • dispatch and number get/update/purchase have --json output code, but the flag isn't defined, so --json is rejected.

Changes

  • egress: update-layout usage no longer shows a positional ID; --id stays required. The flag is renamed to --base-url, with the example moved into its usage text. Example paths now point at cmd/lk/examples.
  • dispatch / number: adds the shared jsonFlag to every command that already checks json.
  • room: participants list now has its own description. update shows --metadata as required (urfave/cli doesn't mark it), and the hidden --room flag, which was never read, is removed. delete shows ROOM_NAME, which matches DeleteRoomRequest.room. Adds the missing examples/auto-participant-egress.json that create refers to.
  • token: reads --room-configuration again.
  • sip: dispatch delete says it takes dispatch rule IDs. Media flag help no longer says "outbound call", and --no-default-codecs now says it only has an effect together with --codecs.

Verification

  • go build ./..., go vet ./cmd/lk/, and go test ./cmd/lk/... pass.
  • Checked the --help output for each changed command.
  • The new example file parses as AutoParticipantEgress with protojson.

No new tests: these are flag definitions and help strings, with no behavior to exercise beyond the help output.

- egress update-layout/update-stream: accept the egress ID positionally or via --id
- egress start and deprecated start-*: point at cmd/lk/examples
- egress test-template: name the flag --base-url (it was unreadable before)
- dispatch list/get/create/delete, number purchase/get/update: add --json
- room participants list: describe the command correctly
- room update: document --metadata as required; drop the unused hidden --room
- room delete: ArgsUsage says ROOM_NAME, matching what DeleteRoom takes
- room create: add the referenced examples/auto-participant-egress.json
- token create: read --room-configuration, the flag that is actually defined
- sip dispatch delete: say it takes dispatch rule IDs
- SIP media flags: drop "outbound call" wording; note --no-default-codecs needs --codecs
@bcherry
bcherry requested a review from rektdeckard September 24, 2026 22:55

@rektdeckard rektdeckard left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested but LGTM

@bcherry
bcherry merged commit a621b0b into main Sep 25, 2026
25 checks passed
@bcherry
bcherry deleted the bcherry/cli-help-fixes branch September 25, 2026 17:37
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.

2 participants