Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuring CLI auth #9

Open
rajdip-b opened this issue Mar 24, 2024 · 4 comments
Open

Configuring CLI auth #9

rajdip-b opened this issue Mar 24, 2024 · 4 comments
Assignees
Labels
priority:urgent Priority description - Urgent type:feat Added some new feature

Comments

@rajdip-b
Copy link
Member

rajdip-b commented Mar 24, 2024

Description

There wont be any ks login as for now. Rather, we will be having a ks configure option. This will prompt the users to enter the api_token, private_key(optional) and profile_name. Then, this will create an entry in ~/.keyshade.toml. It will be in this format:

[workspace_1]
[workspace_1.frontend]
api_token=
private_key=

[workspace_1.backend]
api_token=
private_key=

[workspace_1.openai]
api_token=
private_key=

Any subsequent commands made through the CLI that will require authentication will use the [default] profile.

Requirements

  • Create the ks configure command
  • Add a global flag --profile to specify the profile you want to use with any other command
  • Add a ks workspace default <profile_name> command
  • Add ks workspace list command that will list out all the names of the profiles
  • Add ks workspace list --verbose/v to list out the api token and private key aswell
  • Add ks workspace / project remove <profile_name> to delete a profile. Note that you can not delete a default profile.
@rajdip-b rajdip-b added priority:urgent Priority description - Urgent type:feat Added some new feature labels Mar 24, 2024
@kriptonian1
Copy link
Contributor

for toml we are gonna use https://github.com/toml-rs/toml

@Sambit003
Copy link
Contributor

Sambit003 commented Apr 9, 2024

For configure command

  1. --workspace / -W : will specify the workspace name.
  2. --project / -P : will setup the project name and append the workspace object.

@kriptonian1
Copy link
Contributor

when you first set up the then do:

keyshade-cli configure --workspace <WORKSPACE> --project <PROJECT> or alias ks config -w <WORKSPACE> -p <PROJECT>

when you want to add more project or workspace:

keyshade-cli add --workspace <WORKSPACE> --project <PROJECT> or alias ks add -w <WORKSPACE> -p <PROJECT>

Note

you have to mention --worspace if you want to add a project, if not mentioned then throw error

Remove workspace

keyshade-cli remove --workspace <WORKSPACE> or alias ks rm --workspace <WORKSPACE>

Note

This will remove all the project within an workspace and the workspace itself

Remove project

keyshade-cli remove --workspace <WORKSPACE> --project <PROJECT> or alias ks rm -w <WORKSPACE> --p <PROJECT>

List

  • keyshade-cli list --workspace or alias ks list -w list all workspace
  • keyshade-cli list --workspace <WORKSPACE> --project or alias ks list -w <WORKSPACE> -p list all project from a workspace
  • keyshade-cli list --verbos or alias ks list -v list all project and workspace

@kriptonian1
Copy link
Contributor

for log we are going to use https://crates.io/crates/log

@Sambit003 Sambit003 assigned kriptonian1 and unassigned Sambit003 Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:urgent Priority description - Urgent type:feat Added some new feature
Projects
None yet
Development

No branches or pull requests

3 participants