Manage secrets with Infisical CLI
Log in with the CLI
infisical login
command to authenticate with Infisical.infisical login -i
to avoid browser based loginInitialize Infisical for your project
infisical init
command creates a .infisical.json
file, containing local project settings, at the location where the command is executed..infisical.json
file does not contain any sensitive data, so you may commit it to your git repository.Inject environment variables
run
command hereinfisical login
and following the on-screen instructions — no need to manually set the INFISICAL_API_URL
environment variable.For versions prior to v0.4.0, the CLI defaults to the US Cloud. To connect to the EU Cloud or a self-hosted instance, set the INFISICAL_API_URL
environment variable to https://eu.infisical.com
or your custom URL.INFISICAL_CUSTOM_HEADERS
environment variable:Ignore commands
$HOME/.profile
is pretty common but, you could place it under $HOME/.profile.d/infisical.sh
or any profile file run at loginCan I connect the CLI to my self-hosted Infisical instance?
infisical login
command and follow the on-screen instructions.INFISICAL_API_URL
in your terminal.Can I use the CLI with service tokens?
INFISICAL_TOKEN
. If set, it’ll attempt to use it for authentication.