diff --git a/docs/cli/commands/export.mdx b/docs/cli/commands/export.mdx
index bd74cf1f4..276f64d4b 100644
--- a/docs/cli/commands/export.mdx
+++ b/docs/cli/commands/export.mdx
@@ -16,44 +16,47 @@ Export environment variables from the platform into a file format.
Use this command to export environment variables from the platform into a raw file formats
- ```bash
- $ infisical export
+```bash
+$ infisical export
- # Export variables to a .env file
- infisical export > .env
+# Export variables to a .env file
+infisical export > .env
- # Export variables to a .env file (with export keyword)
- infisical export --format=dotenv-export > .env
+# Export variables to a .env file (with export keyword)
+infisical export --format=dotenv-export > .env
- # Export variables to a CSV file
- infisical export --format=csv > secrets.csv
+# Export variables to a CSV file
+infisical export --format=csv > secrets.csv
- # Export variables to a JSON file
- infisical export --format=json > secrets.json
+# Export variables to a JSON file
+infisical export --format=json > secrets.json
- # Export variables to a YAML file
- infisical export --format=yaml > secrets.yaml
+# Export variables to a YAML file
+infisical export --format=yaml > secrets.yaml
- # Render secrets using a custom template file
- infisical export --template=
- ```
+# Render secrets using a custom template file
+infisical export --template=
+```
+
+### Environment variables
- ### Environment variables
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.
```bash
- # Example
+ # Example
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id= --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.
```
-
- 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
# Example
export INFISICAL_TOKEN=
```
+
@@ -63,16 +66,18 @@ Export environment variables from the platform into a file format.
To use, simply export this variable in the terminal before running this command.
```bash
- # Example
+ # Example
export INFISICAL_DISABLE_UPDATE_CHECK=true
```
+
- ### flags
+### 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.
- ```text my-template-file
+ ```text my-template-file
{{$secrets := secret "" "" ""}}
{{$length := len $secrets}}
{{- "{"}}
@@ -82,24 +87,26 @@ Export environment variables from the platform into a file format.
{{- end }}
{{- end }}
{{ "}" -}}
- ```
+ ```
```bash
# Example
infisical export --template="/path/to/template/file"
```
+
- Used to set the environment that secrets are pulled from.
+ Used to set the environment that secrets are pulled from.
```bash
- # Example
- infisical export --env=prod
+ # Example
+ infisical export --env=prod
```
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`
+
@@ -107,28 +114,32 @@ Export environment variables from the platform into a file format.
This flag allows you to override this behavior by explicitly defining the project to fetch your secrets from.
```bash
- # Example
-
+ # Example
+
infisical export --projectId=XXXXXXXXXXXXXX
```
+
Parse shell parameter expansions in your secrets (e.g., `${DOMAIN}`)
Default value: `true`
+
- 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`
+
Prioritizes personal secrets with the same name over shared secrets
Default value: `true`
+
@@ -138,19 +149,21 @@ Export environment variables from the platform into a file format.
# Example
infisical export --path="/path/to/folder" --env=dev
```
+
When working with tags, you can use this flag to filter and retrieve only secrets that are associated with a specific tag(s).
```bash
- # Example
+ # Example
infisical run --tags=tag1,tag2,tag3 -- npm run dev
```
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
+
diff --git a/docs/cli/commands/run.mdx b/docs/cli/commands/run.mdx
index a81935473..175090d3c 100644
--- a/docs/cli/commands/run.mdx
+++ b/docs/cli/commands/run.mdx
@@ -11,6 +11,7 @@ description: "The command that injects your secrets into local environment"
# Example
infisical run [options] -- npm run dev
```
+
@@ -20,6 +21,7 @@ description: "The command that injects your secrets into local environment"
# Example
infisical run [options] --command "npm run bootstrap && npm run dev start; other-bash-command"
```
+
@@ -27,34 +29,37 @@ description: "The command that injects your secrets into local environment"
Inject secrets from Infisical into your application process.
-
## Subcommands & flags
Use this command to inject secrets into your applications process
- ```bash
- $ infisical run --
+```bash
+$ infisical run --
- # Example
- $ infisical run -- npm run dev
- ```
+# Example
+$ infisical run -- npm run dev
+```
+
+### Environment variables
- ### Environment variables
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.
```bash
- # Example
+ # Example
export INFISICAL_TOKEN=$(infisical login --method=universal-auth --client-id= --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.
```
- 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
# Example
export INFISICAL_TOKEN=
```
+
@@ -64,80 +69,90 @@ Inject secrets from Infisical into your application process.
To use, simply export this variable in the terminal before running this command.
```bash
- # Example
+ # Example
export INFISICAL_DISABLE_UPDATE_CHECK=true
```
+
- ### Flags
-
+### Flags
+
- Explicitly set the directory where the .infisical.json resides. This is useful for some monorepo setups.
+ Explicitly set the directory where the .infisical.json resides. This is useful for some monorepo setups.
```bash
- # Example
+ # Example
infisical run --project-config-dir=/some-dir -- printenv
```
+
Pass secrets into multiple commands at once
```bash
- # Example
+ # Example
infisical run --command="npm run build && npm run dev; more-commands..."
```
+
The project ID to fetch secrets from. This is required when using a machine identity to authenticate.
```bash
- # Example
+ # Example
infisical run --projectId= -- npm run dev
```
+
If you are using a [machine identity](/documentation/platform/identities/machine-identities) to authenticate, you can pass the token as a flag
```bash
- # Example
+ # Example
infisical run --token="" --projectId= -- npm run start
```
- 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
+
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`
+
-
- 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`
-
+{" "}
+
+
+ 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`
+
Prioritizes personal secrets with the same name over shared secrets
Default value: `true`
+
When working with tags, you can use this flag to filter and retrieve only secrets that are associated with a specific tag(s).
```bash
- # Example
+ # Example
infisical run --tags=tag1,tag2,tag3 -- npm run dev
```
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
+
diff --git a/docs/cli/commands/secrets.mdx b/docs/cli/commands/secrets.mdx
index eb4c6f548..bc6e8a3f5 100644
--- a/docs/cli/commands/secrets.mdx
+++ b/docs/cli/commands/secrets.mdx
@@ -31,12 +31,15 @@ $ infisical secrets
```
- 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
# Example
export INFISICAL_TOKEN=
```
+
@@ -64,9 +67,10 @@ $ infisical secrets
The project ID to fetch secrets from. This is required when using a machine identity to authenticate.
```bash
- # Example
+ # Example
infisical secrets --projectId=
```
+
@@ -202,7 +206,7 @@ $ infisical secrets folders
- Fetch folders using an Infisical universal auth access token
+ Fetch folders using an [machine identity](/documentation/platform/identities/machine-identities) access token.
Default value: ``