Skip to content

Introducing project subcommand#92

Merged
davidzhao merged 2 commits intomainfrom
project-management
Sep 15, 2022
Merged

Introducing project subcommand#92
davidzhao merged 2 commits intomainfrom
project-management

Conversation

@davidzhao
Copy link
Copy Markdown
Member

Instead of having to pass in connection details or rely on a fixed set of environment variables, the project subcommand would save multiple connetion details in ~/.livekit/cli-config.yaml.

The design of the CLI takes inspiration from kubectl, where all commands are able to take in a --project flag and automatically use details from that project.

listing projects

% ./bin/livekit-cli project list
+------------+-----------------------------+--------------------------+---------+
|    NAME    |             URL             |         API KEY          | DEFAULT |
+------------+-----------------------------+--------------------------+---------+
| my-server  | https://my-server.host.com  | API012348rquKztZEoZJVabc | true    |
| local      | http://localhost:7880       | devkey                   | false   |
+------------+-----------------------------+--------------------------+---------+

adding project

% ./bin/livekit-cli project add 
Enter project details
✔ URL: http://myhost.com█
✗ API Key: █

setting as default

% ./bin/livekit-cli project set-default local
Saved CLI config to /Users/davidzhao/.livekit/cli-config.yaml
Default project set to local

Instead of having to pass in connection details or rely on a fixed
set of environment variables, the project subcommand would save multiple
connetion details in ~/.livekit/cli-config.yaml.

The design of the CLI takes inspiration from kubectl, where all commands
are able to take in a `--project` flag and automatically use details from
that project.
@davidzhao davidzhao requested review from dsa and matkam September 14, 2022 06:25
Copy link
Copy Markdown
Contributor

@matkam matkam left a comment

Choose a reason for hiding this comment

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

LG!

It could be nice to be able to add projects without a prompt:

./bin/livekit-cli project add --name xxx --url xxx --api-key xxx --api-secret xxx

@davidzhao
Copy link
Copy Markdown
Member Author

./bin/livekit-cli project add --name xxx --url xxx --api-key xxx --api-secret xxx

good idea, makes it faster for advanced users.

@davidzhao davidzhao merged commit 3a88411 into main Sep 15, 2022
@davidzhao davidzhao deleted the project-management branch September 15, 2022 06:28
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