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



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


Authenticate the CLI with the Infisical platform using your email and password.

$ infisical login


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.

$ infisical init

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 app should now be running with the secrets from Infisical injected as environment variables.

See also:

Was this page helpful?