Install script

Spotlight serves a POSIX shell script at /api/install.sh on the Spotlight address. It needs no sign-in. It installs the spotlight binary. With arguments, it then runs spotlight host init with them. Without arguments, it then prints the next steps. See Install a host. On a self-hosted Spotlight, use your deployment's address in place of app.usespotlight.ai.

curl -fsSL https://app.usespotlight.ai/api/install.sh | sh
curl -fsSL https://app.usespotlight.ai/api/install.sh | sh -s -- --token <pool token>
curl -fsSL https://app.usespotlight.ai/api/install.sh \
  | sh -s -- --trust <trust id> --oidc-token-file <token file>

Arguments

Every argument after sh -s -- goes to spotlight host init, after --url <spotlight address>. The Spotlight address is the public address of the Spotlight that served the script, its SPOTLIGHT_PUBLIC_URL. A --url argument replaces it. See spotlight host init for the flags.

Variables

These variables control the download only. The host settings come from the arguments.

VariableDefaultDescription
SPOTLIGHT_VERSIONnoneWhat to install: latest, canary or a release, as in v0.1.0. The script stops on any other value. Without it, the release of the Spotlight that served the script, its SPOTLIGHT_RELEASE, when that is a release, else canary, the latest staging build.
SPOTLIGHT_REPOusespotlightai/spotlightThe GitHub repository releases are downloaded from.
SPOTLIGHT_DOWNLOAD_URLnoneA base URL to download the binary and checksum from, in place of GitHub releases.
SPOTLIGHT_BIN_DIR/usr/local/bin as root or when writable, else ~/.spotlight/binWhere spotlight is installed.
NO_COLORnoneAny value prints without color.

The binary is downloaded from:

SPOTLIGHT_VERSIONURL
latesthttps://github.com/<repo>/releases/latest/download/spotlight-<os>-<arch>
canaryhttps://github.com/<repo>/releases/download/canary/spotlight-<os>-<arch>, the newest staging build. It is not a release.
a release, as in v0.1.0https://github.com/<repo>/releases/download/<version>/spotlight-<os>-<arch>

<os> is linux or darwin. <arch> is amd64 or arm64. The checksum is the same URL with .sha256 appended.

Steps

The script stops at the first failure. Each failure listed under Messages exits 1.

StepAction
1Finds curl or wget, and sha256sum or shasum.
2Reads the platform from uname -s and uname -m.
3Chooses and creates the binary directory.
4Downloads spotlight and its checksum, checks the checksum, and installs the binary at <bin dir>/spotlight.
5When <bin dir> is not on PATH, adds a next step: the line that puts it on PATH.
6With arguments, runs <bin dir>/spotlight host init --url <spotlight address> with them. init asks its questions on the terminal, so they work when the script comes from a pipe. Without arguments, adds three next steps: spotlight, to see what is set up on this computer; spotlight login --url <spotlight address> and spotlight ssh setup, to open tasks in VS Code or Cursor; and spotlight host init --url <spotlight address>, to run agents on this computer.
7Prints the next steps.

With arguments, the script exits with the exit code of spotlight host init. Without arguments, it exits 0.

Messages

Each failure prints Sorry, the install stopped: and the message to standard error.

MessageCause
SPOTLIGHT_VERSION is <value>. Set it to latest, canary or a release, as in v0.1.0.Any other value.
need curl or wget to download spotlightNeither is on PATH.
need sha256sum or shasum to check what it downloadsNeither is on PATH.
unsupported operating system: <os>Not Linux or macOS.
unsupported architecture: <arch>Not x86-64 or ARM64.
could not download spotlight from <url>The binary download failed.
could not download the checksum from <url>.sha256The checksum download failed.
spotlight failed its checksum: expected <sha256>, got <sha256>The download does not match its checksum.

See spotlight host init for what init prints.

On this page