keyshade icon indicating copy to clipboard operation
keyshade copied to clipboard

CLI: Add functionality to operate on Variables

Open rajdip-b opened this issue 7 months ago • 0 comments

Description

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

  • List all variables under a project (keyshade variable list <projectId>)
  • Fetch all revisions of a variable (keyshade variable revisions <variableId>)
  • Create a variable (keyshade variable create <projectId>(refer postman for parameters))
  • Update a variable (keyshade variable update <variableId> (refer postman for parameters))
  • Rollback a variable (keyshade variable rollback <variableId> --environment-slug/-e <> --version/-v <>)
  • Delete a variable (keyshade variable delete <variableId>)

Solution

  • Create an implementation of command.interface.ts and name if VariableCommand.
  • Stash all the functions in src/commands/variable.
  • Use the variableController from ControllerInstance to make the API calls.

rajdip-b avatar Jun 27 '24 12:06 rajdip-b