# Install the CLI

> Install the spicrawl binary with npm or npx, then verify, upgrade or remove it. The curl installer and Homebrew are coming soon.

Source: https://docs.spicrawl.com/cli/install

The CLI is one static binary named `spicrawl` for Linux, macOS and Windows on x64 and arm64. The fastest way to get it on any of them is npm:

```bash
npm install -g @spicrawl/cli
```

> **Note:** The npm package `@spicrawl/cli` is the published channel. The install script, release archives and Homebrew tap below are being set up for the first public release.

## Install

**npm / npx**

Run without installing:

```bash
npx @spicrawl/cli scrape https://example.com --format markdown
```

Or install globally:

```bash
npm install -g @spicrawl/cli
```

The `@spicrawl/cli` package installs the `spicrawl` command and needs Node.js 16 or later. It is one package that carries the prebuilt binaries for all six platforms (Linux, macOS and Windows on x64 and arm64); a small launcher picks the one for your OS and CPU and runs it with the same arguments, stdio and exit code. There is no postinstall script and nothing is downloaded at install time. Set `SPICRAWL_BINARY=/path/to/spicrawl` (`SPICRAWL_BINARY` is also accepted) to point the launcher at a different binary.

**Install script**

(coming soon) The install script is not published yet; until it is, use npm (the first tab).

```bash
curl -fsSL https://spicrawl.com/install.sh | sh
```

The script detects your OS (`linux`, `darwin`) and CPU (`amd64`, `arm64`; Apple silicon under Rosetta gets the native `arm64` build), downloads `spicrawl_<os>_<arch>.tar.gz` from the release, checks its SHA-256 against the release's `checksums.txt`, and installs the binary to `~/.local/bin/spicrawl`.

It never prompts and never uses `sudo`, so it is safe to run from CI or an agent. It exits non-zero on any failure, including a checksum mismatch. If `~/.local/bin` is not on your `PATH`, it prints the `export PATH=...` line to add.

| Variable               | Default        | Meaning                         |
| ---------------------- | -------------- | ------------------------------- |
| `SPICRAWL_INSTALL_DIR` | `~/.local/bin` | Where to put the binary.        |
| `SPICRAWL_VERSION`     | `latest`       | A release tag such as `v1.2.3`. |

```bash
curl -fsSL https://spicrawl.com/install.sh | SPICRAWL_VERSION=v1.2.3 SPICRAWL_INSTALL_DIR=/usr/local/bin sh
```

The script needs `curl` or `wget`, `tar`, and one of `sha256sum`, `shasum` or `openssl`.

**Homebrew**

(coming soon) The Homebrew tap is not published yet; until it is, use npm (the first tab).

```bash
brew install yp-misc/tap/spicrawl
```

The formula installs on macOS and Linux.

**Windows**

Use `npm install -g @spicrawl/cli`, which includes the Windows binaries. Standalone zips (coming soon): download `spicrawl_windows_amd64.zip` (or `spicrawl_windows_arm64.zip`) from the release downloads, unzip it, and put `spicrawl.exe` on your `PATH`. The install script does not support Windows.

## Verify

```bash
spicrawl version
spicrawl auth status --offline
```

`spicrawl version` prints the release version. `spicrawl auth status --offline` confirms the binary runs and shows which key and base URL it would use, without calling the API. Drop `--offline` to also check the key; see [authentication](https://docs.spicrawl.com/cli/authentication.md).

## Upgrade

| Installed with               | Upgrade                                                                                                                |
| ---------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| Install script (coming soon) | Run the same `curl ... \| sh` again. It replaces the binary atomically, so a running `spicrawl` is never half-written. |
| Homebrew (coming soon)       | `brew upgrade spicrawl`                                                                                                |
| npm                          | `npm install -g @spicrawl/cli@latest` (`npx @spicrawl/cli@latest` for one-off runs)                                    |

## Uninstall

```bash
rm "$(spicrawl config path | jq -r .path)"  # optional, first: the saved key
rm ~/.local/bin/spicrawl        # install script (or your SPICRAWL_INSTALL_DIR)
brew uninstall spicrawl           # Homebrew
npm uninstall -g @spicrawl/cli   # npm
```

Removing the binary does not remove the config file that holds your saved key. Delete it first with `rm "$(spicrawl config path | jq -r .path)"` (inside `$(...)` stdout is not a terminal, so the command prints JSON), or remove it by hand: `~/.config/spicrawl/config.json` on Linux, `~/Library/Application Support/spicrawl/config.json` on macOS, `%AppData%\spicrawl\config.json` on Windows.

## Next

Save a key with `spicrawl login`: see [authentication](https://docs.spicrawl.com/cli/authentication.md).
