# Install the CLI

URL: https://forculuslabs.tech/docs/get-started/install/

> Install forculus on macOS, Linux or Windows with the install script, Homebrew or npm.

`forculus` is one program. You use it to deploy apps, share them and read the audit log. Your AI agent can use it too.

It runs on macOS (Apple silicon and Intel), Linux (arm64 and x86-64) and Windows (arm64 and x86-64).

## Install it

1. Run the install script.

   **macOS and Linux**

   ```sh
   curl -fsSL https://forculuslabs.tech/install.sh | sh
   ```

   The script puts `forculus` in `~/.forculus/bin`. It adds that directory to your `PATH` in your shell’s startup files (`.profile`, `.bashrc`, `.zshrc` and fish’s `conf.d`). If `~/.config/forculus/env.sh` is left from an install somewhere else, it writes it again for this one.

   **Windows**

   In PowerShell:

   ```powershell
   irm https://forculuslabs.tech/install.ps1 | iex
   ```

   The script puts `forculus` in `.forculus\bin` in your user profile, and adds that directory to your user `Path`.

   On a Windows on Arm PC, such as a Snapdragon laptop, it installs the arm64 build. Windows PowerShell on Windows 11 before version 22H2 can report the PC as x86-64, and then the script installs the x86-64 build, which runs under emulation. Run the line in PowerShell 7.3 or later to get the arm64 one. Windows on Arm is supported on Windows 11 only. Windows 10 on Arm can’t run x86-64 programs, and we don’t test the arm64 build there.

2. Open a new terminal, so it picks up the new `PATH`. To use `forculus` in the terminal you ran the script in, run the line it prints instead. In zsh, bash or sh that’s:

   ```sh
   . "$HOME/.config/forculus/env.sh"
   ```

   In fish, it’s `source "$HOME/.config/forculus/env.fish"`. On Windows, open a new terminal.

3. Check that it works. Run `forculus --version`, and it prints the version you have.

### Or use Homebrew or npm

On macOS or Linux, with Homebrew:

```sh
brew install Forculus-Labs/tap/forculus
```

With npm:

```sh
npm install -g forculus
```

The npm package downloads the build for your machine, so it needs to reach GitHub. That happens while it installs, or the first time you run `forculus` when npm blocks install scripts, as npm 12 does for any package you haven’t allowed. To have it happen while it installs there, run `npm install -g forculus --allow-scripts=forculus`. It picks the build that matches Node: on Windows on Arm, the arm64 build if you have the arm64 Node, and the x86-64 build if you have the x86-64 Node.

## Update

The CLI doesn’t update itself. Update it the way you installed it:

```sh
curl -fsSL https://forculuslabs.tech/install.sh | sh      # the script, run again
brew upgrade Forculus-Labs/tap/forculus                      # Homebrew
npm install -g forculus@latest                        # npm
```

On Windows, run the PowerShell line again.

To take the CLI off your computer, run `forculus uninstall`. See [Uninstall the CLI](https://forculuslabs.tech/docs/get-started/uninstall/).

## Change where the script installs

Two environment variables change what the install script does:

| Variable                    | Effect                                                          |
| --------------------------- | --------------------------------------------------------------- |
| `FORCULUS_HOME`             | Install into `$FORCULUS_HOME/bin` instead of `~/.forculus/bin`. |
| `FORCULUS_NO_MODIFY_PATH=1` | Leave your shell’s startup files and `PATH` alone.              |

## Use it behind a proxy that inspects TLS

Some company networks send all traffic through a proxy that re-signs TLS with its own certificate authority. Zscaler and Netskope do this.

The CLI trusts what your operating system trusts, the way your browser does. IT usually puts the proxy’s certificate authority there, so on most managed laptops the CLI works wherever your browser does, with nothing to set.

If the proxy’s certificate authority isn’t in your system’s store, every command that talks to Forculus fails with a certificate error. To fix it, point `FORCULUS_CA_FILE` at the proxy’s CA bundle, in PEM:

```sh
export FORCULUS_CA_FILE=/etc/ssl/certs/corp-ca.pem
```

If `FORCULUS_CA_FILE` isn’t set, the CLI uses `SSL_CERT_FILE`, which your IT team may have set already for other tools. The CLI trusts the certificates in the file as well as your system’s.

If the CLI can’t use the file, the command stops before it connects, and names the file:

```text
error: Reading /etc/ssl/certs/corp-ca.pem, set in FORCULUS_CA_FILE: No such file or directory (os error 2).
```

```text
error: /etc/ssl/certs/corp-ca.pem, set in FORCULUS_CA_FILE, has no certificates in it.
```

```text
error: /etc/ssl/certs/corp-ca.pem, set in FORCULUS_CA_FILE, isn't a PEM certificate bundle: base64 decode error: InvalidCharacter(33).
```

```text
error: /etc/ssl/certs/corp-ca.pem, set in FORCULUS_CA_FILE, has a certificate we can't read: invalid peer certificate: BadEncoding.
```

You get the second when the file has no PEM certificate in it, for example a certificate saved as DER. You get the third when a certificate block’s base64 is broken, and the fourth when a block decodes but doesn’t hold a certificate.

## Next steps

- [Sign in](https://forculuslabs.tech/docs/get-started/sign-in/) to connect the CLI to your account.
- [Deploy your first app](https://forculuslabs.tech/docs/get-started/first-deploy/).
