infisical export
Export Infisical secrets from CLI into different file formats
Description
Export environment variables from the platform into a file format.
Subcommands & flags
infisical export
infisical export
Use this command to export environment variables from the platform into a raw file formats
Environment variables
INFISICAL_TOKEN
INFISICAL_TOKEN
Used to fetch secrets via a machine identities apposed to logged in credentials. Simply, export this variable in the terminal before running this command.
Alternatively, you may use service tokens.
INFISICAL_DISABLE_UPDATE_CHECK
INFISICAL_DISABLE_UPDATE_CHECK
Used to disable the check for new CLI versions. This can improve the time it takes to run this command. Recommended for production environments.
To use, simply export this variable in the terminal before running this command.
flags
--template
--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.
--env
--env
Used to set the environment that secrets are pulled from.
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
--projectId
--projectId
By default the project id is retrieved from the .infisical.json
located at the root of your local project.
This flag allows you to override this behavior by explicitly defining the project to fetch your secrets from.
--expand
--expand
Parse shell parameter expansions in your secrets (e.g., ${DOMAIN}
)
Default value: true
--include-imports
--include-imports
By default imported secrets are available, you can disable it by setting this option to false.
Default value: true
--format
--format
Format of the output file. Accepted values: dotenv
, dotenv-export
, csv
, json
and yaml
Default value: dotenv
--secret-overriding
--secret-overriding
Prioritizes personal secrets with the same name over shared secrets
Default value: true
--path
--path
The --path
flag indicates which project folder secrets will be injected from.
--tags
--tags