keyshade-xyz / keyshade

Realtime secret and configuration management tool, with the best in class security and seamless integration support
https://keyshade.xyz
Mozilla Public License 2.0
166 stars 87 forks source link

CLI: Add functionality to operate on Workspace Role #447

Open rajdip-b opened 3 days ago

rajdip-b commented 3 days ago

Description

We would like to perform the following operations for workspace roles using our CLI:

Solution

Meeran-Tofiq commented 2 days ago

/attempt

github-actions[bot] commented 2 days ago

Assigned the issue to @Meeran-Tofiq!

Meeran-Tofiq commented 6 hours ago

Hello @rajdip-b, I hope you're doing well.

Regarding this issue I've had a lot of difficulty in setting up the CLI to make it work for development. First, it said there were issues with it finding @keyshade/api-client. I had to do run a pnpm run build command in packages/api-client to make it work. This was not mentioned in the docs. Then another error came up, which also needed the same command to be ran in packages/secret-scan for @keyshade/secret-scan. This I also could not find in the docs for setting up the cli for development.

Currently, another problem has occurred that I haven't been able to solve: Screenshot from 2024-09-21 13-22-03

It says index.js doesn't exist in keyshade/apps/cli/dist/index.js. But there is an index.js file in keyshade/apps/cli/dist/src/index.js:

Screenshot from 2024-09-21 13-24-01

I'm leaving this comment for a few main reasons:

  1. First, I may have missed where it is documented to fully set up the cli for development. I have only come across this one: image If I have missed it, I'd appreciate being pointed to the correct one.

  2. If however I haven't missed it, I think it would make sense to create a few issues on the github repo to address these problems.

  3. I'd also appreciate being guided, if there is no other documentation option, on how to actually set it up for development.

Thank you very much.

rajdip-b commented 6 hours ago

Hey man, we are really sorry about this trouble you faced. I have to admit, it was a very tough job for us to set up multiple package dependency. With the scripts changing in nearly every push, it was even more difficult to manage. But in #451, I have worked on all the fixes. I intend to merge it by tonight. Expect the CLI docs to be updated aswell.

Again, sorry about the inconvenience.

Meeran-Tofiq commented 6 hours ago

Oh, I see. No worries man you guys are doing an amazing job, don't sweat it. I enjoy working on open-source and I understand these are some issues that come with it. Seriously don't sweat it. Thanks for the kind and timely response as always! :)

and looking forward to see the new docs for it XD

rajdip-b commented 5 hours ago

Hey! Gladly, I could make all the updates right away. Please have a read and let me know if you were able to get the CLI up and running following the docs.

Meeran-Tofiq commented 4 hours ago

After following the updated docs, I still get the following issue that I don't understand:

Screenshot from 2024-09-21 16-04-15

It says index.js doesn't exist in keyshade/apps/cli/dist/index.js. But there is an index.js file in keyshade/apps/cli/dist/src/index.js:

Screenshot from 2024-09-21 13-24-01

Edited to add the command I wrote: pnpm dev:cli -- keyshade workspace list

rajdip-b commented 3 hours ago

Okay, for one, you command is a bit wrong. It will be pnpm dev:cli -- workspace list. Secondly, it's odd what you are facing. I'll try replicate the same on my device.

EDIT: You can join our discord channel to discuss this better imo.

rajdip-b commented 3 hours ago

Okay, I just tried deleting my build folder, and running the command. Seems like it worked. Perhaps, you can try running pnpm build:cli and running it again?