From 66ce269f42ba1c4133fd0fceb5cc83d1850a62cd Mon Sep 17 00:00:00 2001 From: Maidul Islam Date: Thu, 20 Apr 2023 15:19:53 -0700 Subject: [PATCH] add docs for infisical user command --- docs/cli/commands/login.mdx | 5 ++++- docs/cli/commands/user.mdx | 29 +++++++++++++++++++++++++++++ docs/cli/overview.mdx | 7 +++++-- docs/mint.json | 1 + 4 files changed, 39 insertions(+), 3 deletions(-) create mode 100644 docs/cli/commands/user.mdx diff --git a/docs/cli/commands/login.mdx b/docs/cli/commands/login.mdx index 36abaf94e..3028ec110 100644 --- a/docs/cli/commands/login.mdx +++ b/docs/cli/commands/login.mdx @@ -9,4 +9,7 @@ infisical login ## Description The CLI uses authentication to verify your identity. When you enter the correct email and password for your account, a token is generated and saved in your system Keyring to allow you to make future interactions with the CLI. -If you want to change where the login credentials are stored, visit the [vaults command](./vault) \ No newline at end of file + +To change where the login credentials are stored, visit the [vaults command](./vault). + +If you have added multiple users, you can switch between the users by using the [user command](./user). \ No newline at end of file diff --git a/docs/cli/commands/user.mdx b/docs/cli/commands/user.mdx new file mode 100644 index 000000000..38a92bbab --- /dev/null +++ b/docs/cli/commands/user.mdx @@ -0,0 +1,29 @@ +--- +title: "infisical user" +description: "Manage logged in users" +--- + +```bash +infisical user +``` + +## Description +This command allows you to manage the current logged in users on the CLI + +### Sub-commands + + Use this command to switch between profiles that are currently logged into the CLI + + ```bash + infisical user switch + ``` + + + + With this command, you can modify the backend API that is utilized for all requests associated with a specific profile. + For instance, you have the option to point the profile to use either the Infisical Cloud or your own self-hosted Infisical instance. + + ```bash + infisical user update domain + ``` + diff --git a/docs/cli/overview.mdx b/docs/cli/overview.mdx index 53f75996a..32bd06946 100644 --- a/docs/cli/overview.mdx +++ b/docs/cli/overview.mdx @@ -109,7 +109,10 @@ infisical login The CLI is set to connect to Infisical Cloud by default, but if you're running your own instance of Infisical, you can direct the CLI to it using one of the methods provided below. -#### Method 1: Export environment variable +#### Method 1: Use the updated CLI +Beginning with CLI version V0.4.0, it is now possible to choose between logging in through the Infisical cloud or your own self-hosted instance. Simply execute the `infisical login` command and follow the on-screen instructions. + +#### Method 2: Export environment variable You can point the CLI to the self hosted Infisical instance by exporting the environment variable `INFISICAL_API_URL` in your terminal. @@ -135,7 +138,7 @@ You can point the CLI to the self hosted Infisical instance by exporting the env -#### Method 2: Set manually on every command +#### Method 3: Set manually on every command Another option to point the CLI to your self hosted Infisical instance is to set it via a flag on every command you run. ```bash diff --git a/docs/mint.json b/docs/mint.json index 850809a4f..28b2a052f 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -118,6 +118,7 @@ "cli/commands/secrets", "cli/commands/export", "cli/commands/vault", + "cli/commands/user", "cli/commands/reset" ] },