Install the Lucida CLI

Download the lucida command-line tool for macOS, Linux or Windows, check it with lucida --version, and what it needs to log in.

Embed
Preview of the card
<a href="https://lucidace.com/help/install-cli"><img src="https://lucidace.com/help/_api/public/orgs/af34862a-c837-4478-8335-0505efe40459/spaces/2f4b888b-c4e6-488b-81bd-6e838fb12d2e/pages/b070e1c8-7fba-47ae-8fe2-c0bde10b42f9/social-card.svg?v=3e7ae33eec8b" alt="Install the Lucida CLI" width="600" height="315"></a>

The lucida CLI runs lucida login, keys create, doctor, flags, events and mcp add. It is one static binary with no runtime to install.

With Homebrew (macOS and Linux)

brew install lucidaanalytics/tap/lucida

brew upgrade lucida moves to a new release.

With npm (one line)

If you have Node 20.10 or later:

npx @lucida-analytics/cli doctor      # run without installing
npm i -g @lucida-analytics/cli        # or install a `lucida` command

The package downloads the release binary for your platform on first run, checks it against SHA-256 sums that ship inside the package, and caches it. A download that does not match is never run.

Download a release

Pick the newest version on https://github.com/lucidaanalytics/lucida-cli/releases. Each release holds one archive per platform and a checksums.txt.

macOS and Linux (darwin or linux; amd64 or arm64):

VERSION=0.1.3 OS=darwin ARCH=arm64
BASE=https://github.com/lucidaanalytics/lucida-cli/releases/download/v$VERSION
curl -fsSLO $BASE/lucida_${VERSION}_${OS}_${ARCH}.tar.gz
curl -fsSLO $BASE/checksums.txt
grep " lucida_${VERSION}_${OS}_${ARCH}.tar.gz\$" checksums.txt | shasum -a 256 -c -
tar xzf lucida_${VERSION}_${OS}_${ARCH}.tar.gz lucida
sudo mv lucida /usr/local/bin/

Windows: download lucida_<version>_windows_amd64.zip (or arm64) from the release page, check it against checksums.txt (Get-FileHash), unzip, and put lucida.exe on your PATH.

Check it

lucida --version     # lucida v0.1.12

lucida version prints the same. A binary built from source without a release tag prints dev or dev+<commit>. --version needs no login, no network and no checkout of the Lucida repository.

Then log in

lucida login --device     # prints a URL and a code; works on a machine with no browser
lucida login              # opens the browser
lucida doctor

lucida login stores the key in your OS keychain, or in a 0600 file when there is none. How keys and scopes work is in Account API keys. Point the CLI at your own deployment with lucida login --api-url https://<your app host>.

Useful commands

  • lucida doctor --site https://example.com loads the page, checks the snippet and the CSP, and sends a test event (stored nowhere) from the site's origin. It fails when that origin is not in the project's capture_allowed_origins, and warns when replay is on and the CSP leaves no worker source for blob: (only canvas recording uses a worker).

  • lucida origin move https://old.example.com https://example.com replaces the old origin with the new one in capture_allowed_origins and the toolbar origins together. Add --keep-old while the move is under way: both stay allowed, and the command prints the lucida origin remove https://old.example.com to run afterwards.

  • lucida init --settings-only --write writes only the settings YAML folder and touches no source file. Without --settings-only, init --write prints a diff before it edits a file you already have.

Updated