Documentation Index
Fetch the complete documentation index at: https://infisical.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
The Infisical CLI can be used to inject secrets into any framework like Next.js, Express, Django and more in local development.
It can also be used to expose secrets from Infisical as environment variables in CI/CD pipelines and Docker containers
Prerequisites:
Installation
Follow the instructions for your operating system to install the Infisical CLI.
MacOS
Windows
Alpine
RedHat/CentOs/Amazon
Debian/Ubuntu
Arch Linux
Use brew package manager$ brew install infisical/get-cli/infisical
Use Scoop package manager$ scoop bucket add org https://github.com/Infisical/scoop-infisical.git
$ scoop install infisical
Install prerequisite$ apk add --no-cache bash sudo wget
Add Infisical repository$ wget -qO- 'https://artifacts-cli.infisical.com/setup.apk.sh' | sudo sh
Then install CLI$ apk update && sudo apk add infisical
Add Infisical repository$ curl -1sLf \
'https://artifacts-cli.infisical.com/setup.rpm.sh' \
| sudo -E bash
Then install CLI$ sudo yum install infisical
Add Infisical repository$ curl -1sLf \
'https://artifacts-cli.infisical.com/setup.deb.sh' \
| sudo -E bash
Then install CLI$ sudo apt-get update && sudo apt-get install -y infisical
Use the yay package manager to install from the Arch User Repository
Login
Authenticate the CLI with the Infisical platform using your email and password.
Initialization
Navigate to the root of your project directory and run the init command. This step connects your local project to the project on the Infisical platform and creates a infisical.json file containing a reference to that latter project.
Start your app with environment variables injected
$ infisical run -- <your_application_start_command>
Example Start Commands
$ infisical run -- npm run dev
$ infisical run -- flask run
$ infisical run -- ./your_bash_script.sh
Your app should now be running with the secrets from Infisical injected as environment variables.
See also: