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.
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/lucidabrew 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` commandThe 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.12lucida 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 doctorlucida 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.comloads 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'scapture_allowed_origins, and warns when replay is on and the CSP leaves no worker source forblob:(only canvas recording uses a worker).lucida origin move https://old.example.com https://example.comreplaces the old origin with the new one incapture_allowed_originsand the toolbar origins together. Add--keep-oldwhile the move is under way: both stay allowed, and the command prints thelucida origin remove https://old.example.comto run afterwards.lucida init --settings-only --writewrites only the settings YAML folder and touches no source file. Without--settings-only,init --writeprints a diff before it edits a file you already have.