Closed dennwc closed 3 months ago
This should wait for prod deployment. It hides old CLI commands, while new ones won't work without updated server.
@rektdeckard what do you think about the subcommand organization? this is something we'd also want to make consistent across the board.
Regarding sub-commands, it would be also nice to move shared options like URL/key/secret to the root command:
livekit-cli --api-key <key> --api-secret <secret> some sub command
instead of
livekit-cli some sub command --api-key <key> --api-secret <secret>
@davidzhao @dennwc looks like what what we had in mind, and consistent with prior art in the projects
subcommand. Great shout on moving the global parameters too! Other main thing to think about IMO is making the key argument a positional argument, for example:
livekit-cli room join "my-first-room"
instead of
livekit-cli join-room --room "my-first-room"
Since the room is the main and only logical receiver of the command. I don't know if the --request
flag qualifies here or not. WDYT?
Good idea! Will make main arg positional then for new SIP commands :+1:
Regarding flags, that should probably be in a separate PR, because existing commands will need to be updated too.
@rektdeckard Updated new SIP commands to accept main args (id
or request
).
Moving flags to the top will require an update to github.com/urfave/cli/v3
, which added Persistent
to the flag definitions. Could be a separate PR.
Nice! Agree, separate PR for that. v2
seems to be in maintenance mode, so probably a good thing regardless?
Support new SIP Inbound/Outbound Trunk API and move all SIP commands into a separate cli tree:
list-sip-trunk
->sip trunk list
list-sip-dispatch-rule
->sip dispatch list
create-sip-participant
->sip participant create
Old commands continue to work, they are only hidden from the CLI help.
I also renamed the columns for legacy trunks list command. Now they match names in new API (
OutboundNumber
->Number
,InboundNumbers
->AllowedNumbers
).Requires https://github.com/livekit/protocol/pull/738