You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add a --use-temp-file option to the Infisical CLI to allow storing secrets retrieved from the Infisical server in a temporary file, and using the file path in subsequent commands. This temporary file will be automatically deleted after the command execution is finished.
Why would it be useful?
Currently, the Infisical CLI can only inject secrets as environment variables. However, there are cases where secrets need to be used in file form. For example, some programs read secrets from files instead of environment variables, or you may need to manage multiple secrets in a file at once.
The --use-temp-file option allows you to meet these requirements. Infisical users can easily manage secrets in file form and use them in subsequent commands. This will increase the usability of Infisical and improve user convenience.
Additional context
The --use-temp-file option creates a temporary file and stores the secrets in it.
In subsequent commands, you can access the temporary file path through placeholders such as {}.
The temporary file is automatically deleted when the command operation is completed.
infisical run --env=dev --use-temp-file --command="echo temp file path: {}; flutter run --dart-define-from-file={}"
The above command retrieves secrets from the dev environment on the Infisical server, stores them in a temporary file, and passes the file path to the echo and flutter run commands. The flutter run command reads the secrets from the temporary file and runs the application.
Adding this feature will make the Infisical CLI a more powerful and flexible tool.
The text was updated successfully, but these errors were encountered:
jaeyoi
changed the title
Add a option to 'infisical run' for using secrets from a temporary file
[feature request] Add a option to 'infisical run' for using secrets from a temporary file
Feb 12, 2025
Feature description
Add a
--use-temp-file
option to the Infisical CLI to allow storing secrets retrieved from the Infisical server in a temporary file, and using the file path in subsequent commands. This temporary file will be automatically deleted after the command execution is finished.Why would it be useful?
Currently, the Infisical CLI can only inject secrets as environment variables. However, there are cases where secrets need to be used in file form. For example, some programs read secrets from files instead of environment variables, or you may need to manage multiple secrets in a file at once.
The
--use-temp-file
option allows you to meet these requirements. Infisical users can easily manage secrets in file form and use them in subsequent commands. This will increase the usability of Infisical and improve user convenience.Additional context
--use-temp-file
option creates a temporary file and stores the secrets in it.{}
.exec-file
option of SOPS.Here is an example of use:
infisical run --env=dev --use-temp-file --command="echo temp file path: {}; flutter run --dart-define-from-file={}"
The above command retrieves secrets from the dev environment on the Infisical server, stores them in a temporary file, and passes the file path to the
echo
andflutter run
commands. Theflutter run
command reads the secrets from the temporary file and runs the application.Adding this feature will make the Infisical CLI a more powerful and flexible tool.
The text was updated successfully, but these errors were encountered: