From d5d1a00b915a67427c15ff18a3438991dad06561 Mon Sep 17 00:00:00 2001 From: Yuval Bubnovsky <93248620+YuvalBubnovsky@users.noreply.github.com> Date: Wed, 25 Sep 2024 18:03:45 +0300 Subject: [PATCH] docs: Add documentation for workspace command (#464) --- docs/cli/workspace.md | 180 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) create mode 100644 docs/cli/workspace.md diff --git a/docs/cli/workspace.md b/docs/cli/workspace.md new file mode 100644 index 00000000..ddbe5833 --- /dev/null +++ b/docs/cli/workspace.md @@ -0,0 +1,180 @@ +--- +description: The `workspace` command +--- + +# `workspace` + +The `workspace` command is used to manage workspaces on keyshade. A workspace is a collection of projects, environments, secrets, variables, and roles. It has a set of subcommands: + +- [`create`](#create): This command is used to create a new workspace. +- [`delete`](#delete): This command is used to delete an existing workspace. +- [`export`](#export): This command is used to export all projects, environments, secrets, variables, and roles of a workspace into JSON format. +- [`get`](#get): This command is used to fetch a particular workspace. +- [`list`](#list): This command is used to fetch all the workspaces you have access to. +- [`search`](#search): This command is used to perform a full-text search for projects, secrets, variables, and environments in a workspace. +- [`update`](#update): This command is used to update an existing workspace. + +## Usage + +```bash +keyshade workspace [options] +``` + +## `create` + +### Usage + +```bash +keyshade workspace create [options] +``` + +### Options + +These are the options supported by the `create` command: + +#### `-n, --name ` + +The name of the workspace. This is a required field.
+If the name is not provided via the command line option, the user will be prompted to enter it interactively. + +#### `-i, --icon ` + +The icon to be used for this workspace (optional). + +## `delete` + +### Usage + +```bash +keyshade workspace delete +``` + +### Arguments + +These are the arguments supported by the `delete` command: + +#### `` + +Slug of the workspace which you want to delete. + +## `export` + +### Usage + +```bash +keyshade workspace export [options] +``` + +### Arguments + +These are the arguments supported by the `export` command: + +#### `` + +Slug of the workspace which you want to export. + +### Options + +These are the options supported by the `export` command: + +#### `-s, --save-to-file ` + +Saves the exported data to a file. If not provided, the data will be printed to the console. + +## `get` + +### Usage + +```bash +keyshade workspace get +``` + +### Arguments + +These are the arguments supported by the `get` command: + +#### `` + +The slug of the workspace you want to fetch. + +## `list` + +### Usage + +```bash +keyshade workspace list [options] +``` + +### Options + +These are the options supported by the `list` command: + +#### `-p, --page ` + +Index of the page. + +#### `-l, --limit ` + +Total number of items per page. + +#### `-o, --order ` + +Order to sort by - either ascending (ASC) or descending (DESC). + +#### `--sort, --sort ` + +Field to sort by. + +#### `-s, --search ` + +Search term. + +## `search` + +### Usage + +```bash +keyshade workspace search +``` + +### Arguments + +These are the arguments supported by the `search` command: + +#### `` + +Slug of the workspace which you want to search for. + +#### `` + +The search term you want to use for searching. + +## `update` + +### `Usage` + +```bash +keyshade workspace update [options] +``` + +### Arguments + +These are the arguments supported by the `update` command: + +#### `` + +The slug of the workspace you want to update. + +### Options + +These are the options supported by the `update` command: + +#### `-n, --name ` + +The new name for the workspace. + +#### `-i, --icon ` + +The new icon for the workspace. + +At least one of the options (name or icon) must be provided to perform an update.