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

# Installation

> Install SCANOSS-CLI via go install, a prebuilt binary, Docker, or by building from source.

[SCANOSS-CLI](https://github.com/scanoss/scanoss.go) can be installed four ways: with `go install`, as a prebuilt binary, as a Docker image, or built from source. Pick whichever fits your workflow, none require the others.

## go install

Requires the [Go toolchain](https://go.dev/dl/).

```bash theme={null}
go install github.com/scanoss/scanoss.go/cmd/scanoss-cli@latest
```

<Note>
  This installs the CLI as `scanoss-cli` (Go names the binary after its
  package directory), matching the examples throughout this section and
  avoiding a clash with the SCANOSS scan engine (also `scanoss`) on your
  `PATH`.
</Note>

## Prebuilt Binary

Download the archive for your platform from the [releases page](https://github.com/scanoss/scanoss.go/releases), extract it, and move the `scanoss-cli` binary onto your `PATH`:

```bash theme={null}
# Linux (amd64) — adjust the archive for your OS/arch
tar xzf scanoss-cli-linux-amd64.tar.gz
sudo mv scanoss-cli /usr/local/bin/
```

* **Windows** — unzip the `.zip` and add the folder to your `PATH`.
* **macOS** — an unsigned direct download may be quarantined by Gatekeeper; clear it with `xattr -d com.apple.quarantine ./scanoss-cli`.

Verify a download against `checksums.txt`:

```bash theme={null}
sha256sum -c --ignore-missing checksums.txt
```

## Docker

Multi-arch images (`linux/amd64`, `linux/arm64`) are published to GHCR on each release. Mount the code to scan and pass the CLI arguments:

```bash theme={null}
docker run --rm -v "$PWD:/src" ghcr.io/scanoss/scanoss:latest \
  scan /src --api-key "$SCANOSS_API_KEY" > results.json
```

Use `:latest` or a version tag (e.g. `:0.1.0`).

<Note>
  The image runs as a non-root user, so writing output *into* the mounted
  folder (`--output /src/results.json`) can fail with a permission error.
  Either redirect stdout on the host as above, or run the container as your
  own user so writes are owned by you:

  ```bash theme={null}
  docker run --rm --user "$(id -u):$(id -g)" -v "$PWD:/src" \
    ghcr.io/scanoss/scanoss:latest scan /src --api-key "$SCANOSS_API_KEY" --output /src/results.json
  ```
</Note>

## Build From Source

Requires the [Go toolchain](https://go.dev/dl/) and [Git](https://git-scm.com/install/).

```bash theme={null}
git clone https://github.com/scanoss/scanoss.go.git
cd scanoss.go
make build          # or: go build -o scanoss-cli ./cmd/scanoss-cli
```

## Verify the Installation

```bash theme={null}
scanoss-cli --version
```
