Quickstart
Manage secrets with Infisical CLI
The CLI is designed for a variety of secret management applications ranging from local development to CI/CD and production scenarios.
In the following steps, we explore how to use the Infisical CLI to fetch back environment variables from Infisical and inject them into your local development process.
Log in with the CLI
Start by running the infisical login
command to authenticate with Infisical.
If you are in a containerized environment such as WSL 2 or Codespaces, run infisical login -i
to avoid browser based login
Initialize Infisical for your project
Next, navigate to your project and initialize Infisical.
The infisical init
command creates a .infisical.json
file, containing local project settings, at the location where the command is executed.
The .infisical.json
file does not contain any sensitive data, so you may commit it to your git repository.
Inject environment variables
Finally, pass environment variables from Infisical into your application.
View all available options for run
command here
History
Your terminal keeps a history with the commands you run. When you create Infisical secrets directly from your terminal, they’ll stay there for a while.
For security and privacy concerns, we recommend you to configure your terminal to ignore those specific Infisical commands.
FAQ
Was this page helpful?