mirror of
https://github.com/Infisical/infisical.git
synced 2026-01-09 15:38:03 -05:00
127 lines
2.8 KiB
Plaintext
127 lines
2.8 KiB
Plaintext
---
|
|
title: 'Install'
|
|
---
|
|
|
|
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
|
|
|
|
<Tabs>
|
|
<Tab title="MacOS">
|
|
Use [brew](https://brew.sh/) package manager
|
|
|
|
```bash
|
|
brew install infisical/get-cli/infisical
|
|
```
|
|
|
|
### Updates
|
|
|
|
```bash
|
|
brew upgrade infisical
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Windows">
|
|
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
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Alpine">
|
|
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
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="RedHat/CentOs/Amazon">
|
|
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
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Debian/Ubuntu">
|
|
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
|
|
```
|
|
|
|
</Tab>
|
|
<Tab title="Arch Linux">
|
|
Use the `yay` package manager to install from the [Arch User Repository](https://aur.archlinux.org/packages/infisical-bin)
|
|
|
|
```bash
|
|
yay -S infisical-bin
|
|
```
|
|
|
|
</Tab>
|
|
</Tabs>
|
|
|
|
### Log in to the Infisical CLI
|
|
|
|
```bash
|
|
infisical login
|
|
```
|
|
|
|
<Accordion title="Optional: point CLI to self-hosted">
|
|
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 <any-command> --domain="https://your-self-hosted-infisical.com/api"
|
|
```
|
|
</Accordion>
|