> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hooksnode.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Install the CLI

> Download the hooksnode CLI and sign in with an API key.

The `hooksnode` CLI sends the webhooks that your project receives to a port on your computer. See [Listen](/cli/listen).

<Card title="Download the latest release" icon="download" href="https://github.com/mantissatech/hooksnode-cli/releases/latest">
  Binaries for macOS, Linux and Windows, on Intel and ARM.
</Card>

## Install

<Tabs>
  <Tab title="macOS (Homebrew)">
    ```bash theme={null}
    brew install mantissatech/tap/hooksnode
    ```

    The macOS builds are signed and notarized by Apple, so they run without a Gatekeeper warning. Upgrade later with `brew upgrade hooksnode`.
  </Tab>

  <Tab title="macOS and Linux">
    Run the install script:

    ```bash theme={null}
    curl -fsSL https://github.com/mantissatech/hooksnode-cli/releases/latest/download/install.sh | sh
    ```

    The script finds your OS and CPU, downloads the archive, checks it against `checksums.txt`, and puts `hooksnode` in `/usr/local/bin`. If it cannot write there, it uses `~/.local/bin`.

    | Variable                | Use                                                                     |
    | ----------------------- | ----------------------------------------------------------------------- |
    | `HOOKSNODE_VERSION`     | Install a given tag, for example `v1.0.0`. Default: the latest release. |
    | `HOOKSNODE_INSTALL_DIR` | Install to this folder.                                                 |

    ```bash theme={null}
    curl -fsSL https://github.com/mantissatech/hooksnode-cli/releases/latest/download/install.sh | HOOKSNODE_VERSION=v1.0.0 sh
    ```
  </Tab>

  <Tab title="Windows">
    1. Download [`hooksnode_windows_amd64.zip`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_windows_amd64.zip). On an ARM PC, download [`hooksnode_windows_arm64.zip`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_windows_arm64.zip).
    2. Unzip it.
    3. Move `hooksnode.exe` to a folder on your `PATH`.

    ```powershell theme={null}
    hooksnode --version
    ```
  </Tab>

  <Tab title="Manual download">
    | Platform             | Archive                                                                                                                                 |
    | -------------------- | --------------------------------------------------------------------------------------------------------------------------------------- |
    | macOS, Apple silicon | [`hooksnode_darwin_arm64.tar.gz`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_darwin_arm64.tar.gz) |
    | macOS, Intel         | [`hooksnode_darwin_amd64.tar.gz`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_darwin_amd64.tar.gz) |
    | Linux, x86-64        | [`hooksnode_linux_amd64.tar.gz`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_linux_amd64.tar.gz)   |
    | Linux, ARM64         | [`hooksnode_linux_arm64.tar.gz`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_linux_arm64.tar.gz)   |
    | Windows, x86-64      | [`hooksnode_windows_amd64.zip`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_windows_amd64.zip)     |
    | Windows, ARM64       | [`hooksnode_windows_arm64.zip`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/hooksnode_windows_arm64.zip)     |

    Check the download against [`checksums.txt`](https://github.com/mantissatech/hooksnode-cli/releases/latest/download/checksums.txt):

    ```bash theme={null}
    tar -xzf hooksnode_linux_amd64.tar.gz
    grep hooksnode_linux_amd64.tar.gz checksums.txt | sha256sum -c -
    sudo mv hooksnode /usr/local/bin/
    ```
  </Tab>
</Tabs>

Check that it works:

```bash theme={null}
hooksnode --version
```

<Note>On macOS, if Gatekeeper blocks a binary that you downloaded in a browser, run `xattr -d com.apple.quarantine hooksnode`. The install script does not need this.</Note>

## Sign in

<Steps>
  <Step title="Make an API key">
    In the dashboard, open your workspace → **API keys** → **Create key**. Copy the key. hooksnode shows it only once.
  </Step>

  <Step title="Log in">
    ```bash theme={null}
    hooksnode login
    ```

    Press Enter to use the default host (`https://hooksnode.com`), then paste the key. The CLI checks the key and saves it:

    ```text theme={null}
    ✓ logged in to https://hooksnode.com — 2 project(s) available
    ```
  </Step>
</Steps>

The CLI saves the key in `~/.hooksnode/config.json`, which only you can read (mode `0600`).

## Configuration

The CLI reads each setting from, in order:

1. A flag: `--api-key`, `--host`
2. An environment variable: `HOOKSNODE_API_KEY`, `HOOKSNODE_HOST`
3. The config file

If you give a key but no host, the CLI uses `https://hooksnode.com`.

```bash theme={null}
HOOKSNODE_API_KEY=... hooksnode listen 3000
```

## Update

Run the install script again, or download the new archive. `hooksnode --version` shows the version, commit and build date.

## Log out

```bash theme={null}
hooksnode logout
```

This deletes the config file.
