Surveyor

Install the Surveyor CLI

The Surveyor CLI is the spice command. It surveys software on your own machines and uploads the encrypted results to your Topographer project. The installer puts a small wrapper script on your machine, and the wrapper runs the CLI in Docker.

This page covers the free, open source Surveyor CLI. The other editions are described on Editions and licenses.

Before you start

  • Docker, installed and running. Get Docker. If you cannot use Docker, see Run without Docker.
  • Linux containers. The CLI runs in a Linux container. On Windows, Docker Desktop runs Linux containers by default; if it was switched to Windows containers, switch it back (right-click the Docker icon, Switch to Linux containers). Windows Server’s Docker Engine runs only Windows containers.
  • A Spice Pass, to upload surveys to your project. Generate one in the dashboard. A survey run with --no-upload does not need one.

The installer writes only to your home folder, so it needs no administrator rights.

Run the installer

curl -sSfL https://install.spicelabs.io | bash

The installer:

  • Downloads the spice wrapper script to ~/.local/bin/spice.
  • Pulls the spicelabs/spice-labs-cli image and generates Bash and Zsh tab completion from it, in ~/.local/share/spice/completions/.
  • Adds a line that loads tab completion to ~/.bashrc and ~/.zshrc, when those files exist.
  • Warns you if ~/.local/bin is not on your PATH, if SPICE_PASS is not set, or if Docker is missing. It does not change your PATH itself.

Run this in PowerShell:

irm -UseBasicParsing -Uri https://install.spicelabs.io | iex

The installer:

  • Downloads spice.ps1 and a spice.cmd shim to %USERPROFILE%\.spice\bin, so spice works from PowerShell and from cmd.exe.
  • Pulls the spicelabs/spice-labs-cli image, generates PowerShell tab completion from it in %USERPROFILE%\.spice\completions, and loads it from your PowerShell profile.
  • Warns you if %USERPROFILE%\.spice\bin is not on your PATH, if SPICE_PASS is not set, or if Docker is missing. It does not change your PATH itself.

If Docker is missing or the image cannot be pulled, the installer skips tab completion and prints the command that generates it later.

Set your PATH and Spice Pass

Add the install folder to your PATH and set SPICE_PASS to the Spice Pass you copied from the dashboard.

For the current terminal:

export PATH="$PATH:$HOME/.local/bin"
export SPICE_PASS="<your-spice-pass>"

To keep them, add the same lines to your shell profile (~/.bashrc or ~/.zshrc) and open a new terminal.

For the current PowerShell session:

$env:Path += ';' + (Join-Path $HOME '.spice\bin')
$env:SPICE_PASS = '<your-spice-pass>'

For the current cmd.exe session:

set "PATH=%PATH%;%USERPROFILE%\.spice\bin"
set "SPICE_PASS=<your-spice-pass>"

To keep them for your user account, run this in PowerShell, then open a new terminal:

$add = Join-Path $HOME '.spice\bin'
$path = [Environment]::GetEnvironmentVariable('Path', 'User')
if (($path -split ';') -notcontains $add) {
  [Environment]::SetEnvironmentVariable('Path', (($path, $add) -join ';').Trim(';'), 'User')
}
[Environment]::SetEnvironmentVariable('SPICE_PASS', '<your-spice-pass>', 'User')

You can also search the Start menu for “environment variables”, choose Edit environment variables for your account, add %USERPROFILE%\.spice\bin to Path, and add a variable named SPICE_PASS.

Check the installation

Edition

Run spice --version to confirm the wrapper can reach the CLI. The first run pulls the CLI image, so it can take a minute. It prints the hash of the wrapper script, then the CLI version and the commit it was built from. These are the lines to quote when asking for support.

spice --version
~ ❯ spice --version
script version 499912f5957fb1cda5b582edd22ca611f393c531eecc06d894bfb5e062840320
1.9.3
https://github.com/spice-labs-inc/spice-labs-cli git commit: 7fdcf719a78a9f076830a8946bff760d91170a8f
spice --version
~ ❯ spice --version
script version 499912f5957fb1cda5b582edd22ca611f393c531eecc06d894bfb5e062840320
1.8.6
https://github.com/spice-labs-inc/spice-labs-cli git commit: bbfd1217a1245da8d6e79498c2884ddd18dc9485
Surveyor OT Pro (otpro): airgapped; licensed; features: bulk, static-detect, cbom-material
license: valid until 31 December 2027, 23:59 UTC
spice --version
~ ❯ spice --version
script version 499912f5957fb1cda5b582edd22ca611f393c531eecc06d894bfb5e062840320
1.8.6
https://github.com/spice-labs-inc/spice-labs-cli git commit: bbfd1217a1245da8d6e79498c2884ddd18dc9485
Surveyor IT (it): features: bulk, static-detect, inventory-surveys, runtime-surveys, static-surveys, cbom-material
spice --version
~ ❯ spice --version
script version 499912f5957fb1cda5b582edd22ca611f393c531eecc06d894bfb5e062840320
1.8.6
https://github.com/spice-labs-inc/spice-labs-cli git commit: bbfd1217a1245da8d6e79498c2884ddd18dc9485
Surveyor IT Pro (itpro): airgapped; licensed; features: bulk, static-detect, inventory-surveys, runtime-surveys, static-surveys, cbom-material, cbom-full
license: valid until 31 December 2027, 23:59 UTC

On Windows the first two lines are Powershell Script hash and the hash. Then check your Spice Pass:

spice pass decode

It prints a table of the pass’s claims, such as Project ID, Expires At and Upload Server, and ends with a Status line such as Valid (expires in ...). If the table includes Artifact Cutoff (only trial and demo passes have one), see Artifact cutoff.

Keep it up to date

There are two parts to keep current:

  • The CLI image. Before each run, the wrapper pulls the latest image for its tag (latest unless you choose a version). If the pull fails and you have a local copy, the run continues with it and prints Using local copy.
  • The wrapper script. After the pull, the wrapper compares itself with the latest release. When yours is older, it prints A newer version of this script is available. Run: followed by the install command. Run the installer again to update it.

To pin a CLI version instead of following latest, or to skip the pull, see Pin the CLI version.

Run without Docker

JVM mode runs the CLI with Java on your machine instead of in Docker. Set SPICE_LABS_CLI_USE_JVM=1 and point SPICE_LABS_CLI_JAR at the CLI jar. JVM mode needs Java 21 or later and a few tools the Docker image otherwise provides: see JVM mode. To build the jar yourself, see the spice-labs-cli repository.

Uninstall

rm ~/.local/bin/spice
rm -rf ~/.local/share/spice ~/.cache/spice
docker rmi spicelabs/spice-labs-cli

Then delete the lines under # Spice CLI tab completion from ~/.bashrc and ~/.zshrc, and remove SPICE_PASS from your shell profile.

Remove-Item -Recurse -Force (Join-Path $HOME '.spice')
Remove-Item -Recurse -Force (Join-Path $env:LOCALAPPDATA 'spice') -ErrorAction SilentlyContinue
docker rmi spicelabs/spice-labs-cli

Then remove %USERPROFILE%\.spice\bin from your Path, delete the SPICE_PASS variable, and delete the lines under # Spice CLI tab completion from your PowerShell profile (the file named by $PROFILE.CurrentUserAllHosts).

Uninstalling leaves your survey results alone: results you wrote with --output stay where you put them, and recordings kept with --keep-recording stay under ~/.spicelabs/runtime-survey or the --output folder you chose.

Next steps