--- title: 'Install' description: "Infisical's CLI is one of the best way to manage environments and secrets. Install it here" --- Prerequisite: Set up an account with [Infisical Cloud](https://app.infisical.com) or via a [self-hosted installation](/self-hosting/overview). The Infisical CLI provides a way to inject environment variables from the platform into your apps and infrastructure. ## Installation Use [brew](https://brew.sh/) package manager ```bash brew install infisical/get-cli/infisical ``` ### Updates ```bash brew upgrade infisical ``` Use [Scoop](https://scoop.sh/) package manager ```bash scoop bucket add org https://github.com/Infisical/scoop-infisical.git ``` ```bash scoop install infisical ``` ### Updates ```bash scoop update infisical ``` Install prerequisite ```bash sudo apk add --no-cache bash sudo ``` Add Infisical repository ```bash curl -1sLf \ 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.alpine.sh' \ | sudo -E bash ``` Then install CLI ```bash sudo apk update && sudo apk add infisical ``` Add Infisical repository ```bash curl -1sLf \ 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.rpm.sh' \ | sudo -E bash ``` Then install CLI ```bash sudo yum install infisical ``` Add Infisical repository ```bash curl -1sLf \ 'https://dl.cloudsmith.io/public/infisical/infisical-cli/setup.deb.sh' \ | sudo -E bash ``` Then install CLI ```bash sudo apt-get update && sudo apt-get install -y infisical ``` Use the `yay` package manager to install from the [Arch User Repository](https://aur.archlinux.org/packages/infisical-bin) ```bash yay -S infisical-bin ``` ### Log in to the Infisical CLI ```bash infisical login ``` The CLI is set to connect to Infisical Cloud by default, but if you're running your own instance of Infisical, you can direct the CLI to it using one of the methods provided below. #### Export environment variable You can point the CLI to the self hosted Infisical instance by exporting the environment variable `INFISICAL_API_URL` in your terminal. ```bash # Example export INFISICAL_API_URL="https://your-self-hosted-infisical.com/api" ``` #### Set manually on every command Another option to point the CLI to your self hosted Infisical instance is to set it via a flag on every command you run. ```bash # Example infisical --domain="https://your-self-hosted-infisical.com/api" ```