> ## 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.

# CLI

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](/documentation/getting-started/docker)

Prerequisites:

* Have a project with secrets ready in [Infisical Cloud](https://app.infisical.com).

## Installation

Follow the instructions for your operating system to install the Infisical CLI.

<Tabs>
  <Tab title="MacOS">
    Use [brew](https://brew.sh/) package manager

    ```console theme={"dark"}
    $ brew install infisical/get-cli/infisical
    ```
  </Tab>

  <Tab title="Windows">
    Use [Scoop](https://scoop.sh/) package manager

    ```console theme={"dark"}
    $ scoop bucket add org https://github.com/Infisical/scoop-infisical.git
    ```

    ```console theme={"dark"}
    $ scoop install infisical
    ```
  </Tab>

  <Tab title="Alpine">
    Install prerequisite

    ```console theme={"dark"}
    $ apk add --no-cache bash sudo wget
    ```

    Add Infisical repository

    ```console theme={"dark"}
    $ wget -qO- 'https://artifacts-cli.infisical.com/setup.apk.sh' | sudo sh
    ```

    Then install CLI

    ```console theme={"dark"}
    $ apk update && sudo apk add infisical
    ```
  </Tab>

  <Tab title="RedHat/CentOs/Amazon">
    Add Infisical repository

    ```console theme={"dark"}
    $ curl -1sLf \
    'https://artifacts-cli.infisical.com/setup.rpm.sh' \
    | sudo -E bash
    ```

    Then install CLI

    ```console theme={"dark"}
    $ sudo yum install infisical
    ```
  </Tab>

  <Tab title="Debian/Ubuntu">
    Add Infisical repository

    ```console theme={"dark"}
    $ curl -1sLf \
    'https://artifacts-cli.infisical.com/setup.deb.sh' \
    | sudo -E bash
    ```

    Then install CLI

    ```console theme={"dark"}
    $ sudo apt-get update && sudo apt-get install -y infisical
    ```
  </Tab>

  <Tab title="Arch Linux">
    Use the `yay` package manager to install from the [Arch User Repository](https://aur.archlinux.org/packages/infisical-bin)

    ```console theme={"dark"}
    $ yay -S infisical-bin
    ```
  </Tab>
</Tabs>

## Login

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

```console theme={"dark"}
$ infisical login
```

## 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.

```console theme={"dark"}
$ infisical init
```

## Start your app with environment variables injected

```console theme={"dark"}
$ infisical run -- <your_application_start_command>
```

## Example Start Commands

```console theme={"dark"}
$ 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:

* [Full documentation for the Infisical CLI](/cli/overview)
