Start updating docs

This commit is contained in:
Tuan Dang
2024-04-30 08:59:02 -07:00
parent 5c0e5a8ae0
commit 667f696d26
3 changed files with 89 additions and 57 deletions
+15 -2
View File
@@ -39,6 +39,7 @@ Export environment variables from the platform into a file format.
``` ```
### Environment variables ### Environment variables
<Accordion title="INFISICAL_TOKEN"> <Accordion title="INFISICAL_TOKEN">
Used to fetch secrets via a [machine identities](/documentation/platform/identities/machine-identities) apposed to logged in credentials. Simply, export this variable in the terminal before running this command. Used to fetch secrets via a [machine identities](/documentation/platform/identities/machine-identities) apposed to logged in credentials. Simply, export this variable in the terminal before running this command.
@@ -47,13 +48,15 @@ Export environment variables from the platform into a file format.
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages. export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id=<identity-client-id> --client-secret=<identity-client-secret> --silent --plain) # --plain flag will output only the token, so it can be fed to an environment variable. --silent will disable any update messages.
``` ```
<Info> <Info>
Alternatively you may also use service tokens. **Service tokens are legacy tokens that are a precursor to machine identities, and will be removed in the future.** Alternatively, you may use service tokens.
Please note, however, that service tokens are being deprecated. They will be removed in the future in accordance with the deprecation notice and timeline stated [here](https://infisical.com/blog/deprecating-api-keys).
```bash ```bash
# Example # Example
export INFISICAL_TOKEN=<service-token> export INFISICAL_TOKEN=<service-token>
``` ```
</Info> </Info>
</Accordion> </Accordion>
@@ -66,9 +69,11 @@ Export environment variables from the platform into a file format.
# Example # Example
export INFISICAL_DISABLE_UPDATE_CHECK=true export INFISICAL_DISABLE_UPDATE_CHECK=true
``` ```
</Accordion> </Accordion>
### flags ### flags
<Accordion title="--template"> <Accordion title="--template">
The `--template` flag specifies the path to the template file used for rendering secrets. When using templates, you can omit the other format flags. The `--template` flag specifies the path to the template file used for rendering secrets. When using templates, you can omit the other format flags.
@@ -88,6 +93,7 @@ Export environment variables from the platform into a file format.
# Example # Example
infisical export --template="/path/to/template/file" infisical export --template="/path/to/template/file"
``` ```
</Accordion> </Accordion>
<Accordion title="--env"> <Accordion title="--env">
Used to set the environment that secrets are pulled from. Used to set the environment that secrets are pulled from.
@@ -100,6 +106,7 @@ Export environment variables from the platform into a file format.
Note: this flag only accepts environment slug names not the fully qualified name. To view the slug name of an environment, visit the project settings page. Note: this flag only accepts environment slug names not the fully qualified name. To view the slug name of an environment, visit the project settings page.
default value: `dev` default value: `dev`
</Accordion> </Accordion>
<Accordion title="--projectId"> <Accordion title="--projectId">
@@ -111,24 +118,28 @@ Export environment variables from the platform into a file format.
infisical export --projectId=XXXXXXXXXXXXXX infisical export --projectId=XXXXXXXXXXXXXX
``` ```
</Accordion> </Accordion>
<Accordion title="--expand"> <Accordion title="--expand">
Parse shell parameter expansions in your secrets (e.g., `${DOMAIN}`) Parse shell parameter expansions in your secrets (e.g., `${DOMAIN}`)
Default value: `true` Default value: `true`
</Accordion> </Accordion>
<Accordion title="--format"> <Accordion title="--format">
Format of the output file. Accepted values: `dotenv`, `dotenv-export`, `csv`, `json` and `yaml` Format of the output file. Accepted values: `dotenv`, `dotenv-export`, `csv`, `json` and `yaml`
Default value: `dotenv` Default value: `dotenv`
</Accordion> </Accordion>
<Accordion title="--secret-overriding"> <Accordion title="--secret-overriding">
Prioritizes personal secrets with the same name over shared secrets Prioritizes personal secrets with the same name over shared secrets
Default value: `true` Default value: `true`
</Accordion> </Accordion>
<Accordion title="--path"> <Accordion title="--path">
@@ -138,6 +149,7 @@ Export environment variables from the platform into a file format.
# Example # Example
infisical export --path="/path/to/folder" --env=dev infisical export --path="/path/to/folder" --env=dev
``` ```
</Accordion> </Accordion>
<Accordion title="--tags"> <Accordion title="--tags">
@@ -151,6 +163,7 @@ Export environment variables from the platform into a file format.
Note: you must reference the tag by its slug name not its fully qualified name. Go to project settings to view all tag slugs. Note: you must reference the tag by its slug name not its fully qualified name. Go to project settings to view all tag slugs.
By default, all secrets are fetched By default, all secrets are fetched
</Accordion> </Accordion>
</Accordion> </Accordion>
+20 -5
View File
@@ -11,6 +11,7 @@ description: "The command that injects your secrets into local environment"
# Example # Example
infisical run [options] -- npm run dev infisical run [options] -- npm run dev
``` ```
</Tab> </Tab>
<Tab title="Chained commands"> <Tab title="Chained commands">
@@ -20,6 +21,7 @@ description: "The command that injects your secrets into local environment"
# Example # Example
infisical run [options] --command "npm run bootstrap && npm run dev start; other-bash-command" infisical run [options] --command "npm run bootstrap && npm run dev start; other-bash-command"
``` ```
</Tab> </Tab>
</Tabs> </Tabs>
@@ -27,7 +29,6 @@ description: "The command that injects your secrets into local environment"
Inject secrets from Infisical into your application process. Inject secrets from Infisical into your application process.
## Subcommands & flags ## Subcommands & flags
<Accordion title="infisical run" defaultOpen="true"> <Accordion title="infisical run" defaultOpen="true">
@@ -41,6 +42,7 @@ Inject secrets from Infisical into your application process.
``` ```
### Environment variables ### Environment variables
<Accordion title="INFISICAL_TOKEN"> <Accordion title="INFISICAL_TOKEN">
Used to fetch secrets via a [machine identity](/documentation/platform/identities/machine-identities) apposed to logged in credentials. Simply, export this variable in the terminal before running this command. Used to fetch secrets via a [machine identity](/documentation/platform/identities/machine-identities) apposed to logged in credentials. Simply, export this variable in the terminal before running this command.
@@ -50,11 +52,14 @@ Inject secrets from Infisical into your application process.
``` ```
<Info> <Info>
Alternatively you may also use service tokens. **Service tokens are legacy tokens that are a precursor to machine identities, and will be removed in the future.** Alternatively, you may use service tokens.
Please note, however, that service tokens are being deprecated. They will be removed in the future in accordance with the deprecation notice and timeline stated [here](https://infisical.com/blog/deprecating-api-keys).
```bash ```bash
# Example # Example
export INFISICAL_TOKEN=<service-token> export INFISICAL_TOKEN=<service-token>
``` ```
</Info> </Info>
</Accordion> </Accordion>
@@ -67,6 +72,7 @@ Inject secrets from Infisical into your application process.
# Example # Example
export INFISICAL_DISABLE_UPDATE_CHECK=true export INFISICAL_DISABLE_UPDATE_CHECK=true
``` ```
</Accordion> </Accordion>
### Flags ### Flags
@@ -78,6 +84,7 @@ Inject secrets from Infisical into your application process.
# Example # Example
infisical run --project-config-dir=/some-dir -- printenv infisical run --project-config-dir=/some-dir -- printenv
``` ```
</Accordion> </Accordion>
<Accordion title="--command"> <Accordion title="--command">
@@ -87,6 +94,7 @@ Inject secrets from Infisical into your application process.
# Example # Example
infisical run --command="npm run build && npm run dev; more-commands..." infisical run --command="npm run build && npm run dev; more-commands..."
``` ```
</Accordion> </Accordion>
<Accordion title="--projectId"> <Accordion title="--projectId">
@@ -96,6 +104,7 @@ Inject secrets from Infisical into your application process.
# Example # Example
infisical run --projectId=<project-id> -- npm run dev infisical run --projectId=<project-id> -- npm run dev
``` ```
</Accordion> </Accordion>
<Accordion title="--token"> <Accordion title="--token">
@@ -107,24 +116,29 @@ Inject secrets from Infisical into your application process.
``` ```
You may also expose the token to the CLI by setting the environment variable `INFISICAL_TOKEN` before executing the run command. This will have the same effect as setting the token with `--token` flag You may also expose the token to the CLI by setting the environment variable `INFISICAL_TOKEN` before executing the run command. This will have the same effect as setting the token with `--token` flag
</Accordion> </Accordion>
<Accordion title="--expand"> <Accordion title="--expand">
Turn on or off the shell parameter expansion in your secrets. If you have used shell parameters in your secret(s), activating this feature will populate them before injecting them into your application process. Turn on or off the shell parameter expansion in your secrets. If you have used shell parameters in your secret(s), activating this feature will populate them before injecting them into your application process.
Default value: `true` Default value: `true`
</Accordion> </Accordion>
<Accordion title="--env"> {" "}
This is used to specify the environment from which secrets should be retrieved. The accepted values are the environment slugs defined for your project, such as `dev`, `staging`, `test`, and `prod`.
Default value: `dev` <Accordion title="--env">
This is used to specify the environment from which secrets should be
retrieved. The accepted values are the environment slugs defined for your
project, such as `dev`, `staging`, `test`, and `prod`. Default value: `dev`
</Accordion> </Accordion>
<Accordion title="--secret-overriding"> <Accordion title="--secret-overriding">
Prioritizes personal secrets with the same name over shared secrets Prioritizes personal secrets with the same name over shared secrets
Default value: `true` Default value: `true`
</Accordion> </Accordion>
<Accordion title="--tags"> <Accordion title="--tags">
@@ -138,6 +152,7 @@ Inject secrets from Infisical into your application process.
Note: you must reference the tag by its slug name not its fully qualified name. Go to project settings to view all tag slugs. Note: you must reference the tag by its slug name not its fully qualified name. Go to project settings to view all tag slugs.
By default, all secrets are fetched By default, all secrets are fetched
</Accordion> </Accordion>
<Accordion title="--path"> <Accordion title="--path">
+6 -2
View File
@@ -31,12 +31,15 @@ $ infisical secrets
``` ```
<Info> <Info>
Alternatively you may also use service tokens. **Service tokens are legacy tokens that are a precursor to machine identities, and will be removed in the future.** Alternatively, you may use service tokens.
Please note, however, that service tokens are being deprecated. They will be removed in the future in accordance with the deprecation notice and timeline stated [here](https://infisical.com/blog/deprecating-api-keys).
```bash ```bash
# Example # Example
export INFISICAL_TOKEN=<service-token> export INFISICAL_TOKEN=<service-token>
``` ```
</Info> </Info>
</Accordion> </Accordion>
<Accordion title="INFISICAL_DISABLE_UPDATE_CHECK"> <Accordion title="INFISICAL_DISABLE_UPDATE_CHECK">
@@ -67,6 +70,7 @@ $ infisical secrets
# Example # Example
infisical secrets --projectId=<project-id> infisical secrets --projectId=<project-id>
``` ```
</Accordion> </Accordion>
<Accordion title="--env"> <Accordion title="--env">
@@ -202,7 +206,7 @@ $ infisical secrets folders
</Accordion> </Accordion>
<Accordion title="--token"> <Accordion title="--token">
Fetch folders using an Infisical universal auth access token Fetch folders using an [machine identity](/documentation/platform/identities/machine-identities) access token.
Default value: `` Default value: ``
</Accordion> </Accordion>