# Install LUCID

Install LUCID in under a minute on **macOS Apple Silicon**, **Windows 11 / 10 (`x86_64`)**, or **Linux (`x86_64` & `aarch64`)**. Pick the **Desktop app** for a chat-first UI, visual MCP & Web Browser tools, compact Activity Monitor, and one-click updates, or the standalone **`lucidd` CLI** for servers, cloud relays, and headless GPU machines.

Every GitHub Release ships a unified `SHA256SUMS.txt`, and every installer verifies checksums and platform code signatures before unpacking anything.

> [!NOTE]
> Download the latest beta **`v0.2.0-rc42`** for pinned **`llama.cpp b12977`** (Metal, CUDA, Vulkan, CPU), cross-platform day-one installers (including signed Windows CUDA/Vulkan Desktop setup and 1-click managed portable Node.js `v24.23.0` LTS), the **MCP `2026-07-28`** dual-era engine and **Web Browser auto-launcher**, compact resizable **Activity Monitor** with Pin toggle, **Discrete Slice Quorum** with trusted-source slice hydration and `/phase/shard-rpc/2.0.0` wire-dedup, Multimodal Vision, and verified in-app Software Updates.

## Cross-platform day-one matrix (`v0.2.0-rc42`)

| Platform | Desktop Installer | Standalone CLI | Pinned `llama.cpp b12977` Backends | Verification |
|---|---|---|---|---|
| **macOS Apple Silicon** (macOS 14+) | `LUCID_0.2.0_aarch64.dmg` | `scripts/install-lucid.sh` | Metal + optional Apple Silicon MLX | SHA-256 + Developer ID + Apple Notarization (`spctl`) |
| **Windows (`x86_64`)** | Per-user signed `-setup.exe` (zero UAC) | `scripts/install-lucid.ps1` | CUDA 12 / Vulkan / CPU + managed portable Node.js `v24.23.0` LTS | SHA-256 + Authenticode + RFC 3161 + publisher pin |
| **Linux (`x86_64`)** | `LUCID_0.2.0_amd64.deb` | `scripts/install-lucid.sh` (baseline `x86-64` tarball) | CUDA 12.8 / Vulkan / CPU | SHA-256 (`SHA256SUMS.txt`) |
| **Linux (`aarch64`)** | `LUCID_0.2.0_arm64.deb` | `scripts/install-lucid.sh` (`aarch64` tarball) | CPU / Vulkan | SHA-256 (`SHA256SUMS.txt`) |

## macOS (Apple Silicon, macOS 14+)

### Desktop app (recommended)

1. Open [GitHub Releases](https://github.com/msitarzewski/phase/releases) and download `LUCID_0.2.0_aarch64.dmg` from **`v0.2.0-rc42`**.
2. Open the disk image and drag **LUCID** into **Applications**.
3. Open **LUCID** from Applications. Release builds are signed with Apple Developer ID and Apple-notarized, so they open cleanly with Gatekeeper.

LUCID Desktop manages its own bundled `lucidd` sidecar on `127.0.0.1:11435` (falling back to an ephemeral loopback port if `:11435` is busy) and never runs as root.

### Terminal installer (CLI + optional `.app`)

Install `~/.local/bin/lucidd` and `~/Applications/LUCID.app` with automatic SHA-256 and `codesign --verify --deep --strict` verification:

```bash
curl -fsSL https://raw.githubusercontent.com/msitarzewski/phase/main/scripts/install-lucid.sh | bash -s -- --app
```

CLI only (omitting the Desktop app):

```bash
curl -fsSL https://raw.githubusercontent.com/msitarzewski/phase/main/scripts/install-lucid.sh | bash
```

## Windows (x86_64)

### Desktop app (recommended — zero UAC prompt, CUDA & Vulkan ready)

1. Open [GitHub Releases](https://github.com/msitarzewski/phase/releases) and download the signed `LUCID-<version>-x86_64-pc-windows-msvc-setup.exe` from **`v0.2.0-rc42`**.
2. Run the setup wizard—it installs per user with **no administrator / UAC prompt**, downloads the Microsoft WebView2 bootstrapper only if needed, and registers `lucid://` links and `.lucidinvite` files automatically.
3. Open **LUCID** from the Start menu. The bundled `lucidd.exe` runs silently in the background with no console window and supports pinned `llama.cpp b12977` **CUDA** (NVIDIA) and **Vulkan** (AMD / Intel / cross-vendor) GPU acceleration.
4. Optional: inside **Tools & Skills Hub**, click **Install Node.js LTS** to fetch a private, SHA-256-verified portable **Node.js `v24.23.0` LTS** runtime so `npx`-based MCP tools (including the **Web Browser auto-launcher**, which auto-detects Microsoft Edge when Chrome is not installed) work immediately with no system Node.js install.

### PowerShell installer (Desktop or CLI — Windows 11 Home & PowerShell 5.1 compatible)

Works out of the box on built-in **Windows PowerShell 5.1** (including fresh Windows 11 Home PCs) as well as **PowerShell 7**:

```powershell
Invoke-WebRequest -UseBasicParsing -Uri https://raw.githubusercontent.com/msitarzewski/phase/main/scripts/install-lucid.ps1 -OutFile .\install-lucid.ps1
powershell -NoProfile -ExecutionPolicy Bypass -File .\install-lucid.ps1 -Desktop
```

Useful `install-lucid.ps1` flags:

- `-Desktop` (alias `-App`) — downloads, verifies, and launches the signed Desktop NSIS setup `.exe`. Omit `-Desktop` to install only the standalone `lucidd.exe` CLI into `%LOCALAPPDATA%\LUCID\bin` and add it to your user `PATH` (open a new terminal afterward).
- `-Silent` — runs the Desktop NSIS setup unattended.
- `-Tag <release-tag>` — installs a specific release tag (e.g. `v0.2.0-rc42`) instead of the latest published tag.
- `-FromDir <folder>` — installs offline from a local folder containing the release asset and `SHA256SUMS.txt`.
- `-ExpectedPublisher '<exact certificate subject>'` — pins a specific trusted certificate subject in place of the default Microsoft Azure Artifact Signing chain check.
- `-AllowUnsigned` — only for intentionally unsigned local developer test builds (never needed for releases).

## Linux (`x86_64` and `aarch64`)

### Ubuntu / Debian Desktop (`.deb`)

Download the `.deb` package for your architecture (`amd64` or `arm64`) from [GitHub Releases](https://github.com/msitarzewski/phase/releases) and install it with `apt` so WebKitGTK and GTK 3 dependencies (`libwebkit2gtk-4.1-0`, `libgtk-3-0`) are resolved automatically:

```bash
sudo apt install ./LUCID_0.2.0_amd64.deb
```

On `aarch64` / ARM64 systems, install `LUCID_0.2.0_arm64.deb`.

### Linux CLI installer (`x86_64` & `aarch64`)

The `x86_64` release tarball targets baseline `x86-64` (`-mno-bmi -mno-bmi2 -mno-avx2`) so it runs without `SIGILL` crashes even on 2012-era Intel and AMD CPUs, alongside native `aarch64` tarballs for ARM64 hosts:

```bash
curl -fsSL https://raw.githubusercontent.com/msitarzewski/phase/main/scripts/install-lucid.sh | bash
```

Useful installer flags in `scripts/install-lucid.sh`:

- `--tag vX.Y.Z` — pin an exact GitHub release tag (e.g. `v0.2.0-rc42`) instead of `latest`
- `--from-dir /path/to/dir` — install offline from a local directory containing the archive and `SHA256SUMS.txt`
- `--prefix ~/.local` — choose the install root (default `~/.local`, binary in `~/.local/bin/lucidd`)
- `--install-systemd` — install the user-level `lucidd-relay.service` unit
- `--setup-relay 203.0.113.10` — write a mode-`0600` `infrastructure.env` for a relay host

## Keeping LUCID up to date

### In LUCID Desktop (recommended)

LUCID checks GitHub Releases automatically when you open the app:

1. When a newer release is published, an **Update** pill appears in the top bar (or open **Settings & Safety → Software Updates** and click **Check Now** anytime).
2. Click **Install `<tag>`** (macOS & Windows) or **Download `<tag>`** (Linux `.deb`).
3. LUCID downloads and cryptographically verifies the release before touching your installation—on Windows, complete the verified setup wizard and reopen LUCID; on macOS, LUCID verifies and applies the update cleanly; on Linux, install the verified `.deb` downloaded for you.

### From the CLI (`lucidd update`)

Check whether a newer CLI release is available without modifying anything:

```bash
lucidd update --check
```

Install the latest verified release (or pin a specific tag with `--tag`):

```bash
lucidd update --yes
lucidd update --tag v0.2.0-rc42 --yes
lucidd update --check --json
```

### Technical verification details (fail-closed)

Every update path enforces strict verification before extracting or executing a single byte:

- **All platforms (CLI & Desktop):** Fetches the release's `SHA256SUMS.txt` over HTTPS, requires an exact single SHA-256 match for the target archive/installer, rejects archive path traversal, and (for CLI updates) smoke-tests the staged binary (`--help`) before atomically replacing the running executable (using a `.old` rename swap on Windows).
- **macOS Desktop:** Verifies SHA-256, Apple Developer ID signature (`codesign --verify --deep --strict`), and Apple Gatekeeper assessment (`spctl --assess`) before applying.
- **Windows Desktop & `install-lucid.ps1`:** Verifies SHA-256, Windows Authenticode signature (`Get-AuthenticodeSignature`), Code Signing EKU, an **RFC 3161** trusted timestamp (rejecting legacy countersignatures), and—for Desktop auto-updates—exact publisher pinning against both the running executable and the release publisher subject embedded at build time (`LUCID_WINDOWS_PUBLISHER_SUBJECT`). Unsigned development builds refuse to launch auto-updates.

## Verify checksums manually

Every GitHub Release includes a single `SHA256SUMS.txt` covering all `.tar.gz`, `.zip`, `.dmg`, `.deb`, and `.exe` assets.

On macOS:

```bash
shasum -a 256 -c --ignore-missing SHA256SUMS.txt
```

On Linux:

```bash
sha256sum -c --ignore-missing SHA256SUMS.txt
```

On Windows PowerShell:

```powershell
Get-FileHash -Algorithm SHA256 .\LUCID-0.2.0-x86_64-pc-windows-msvc-setup.exe
Get-AuthenticodeSignature -LiteralPath .\LUCID-0.2.0-x86_64-pc-windows-msvc-setup.exe
```

## Build from source

Requires Rust `1.89+` (workspace edition `2021`). To build and test the Rust workspace (all 9 crates, including `lucidd`, `lumend`, and `plasmd`):

```bash
git clone https://github.com/msitarzewski/phase.git
cd phase
cargo build --release --locked
cargo test --workspace --locked
```

To build LUCID Desktop (requires Node.js 22+ and Tauri v2 platform dependencies):

```bash
cd apps/lucid-desktop
bash stage-sidecar.sh ../../target/release/lucidd
npm ci
npm run check
npx tauri build
```

> [!TIP]
> Ready to send your first prompt, launch Web Browser MCP, open Activity Monitor, or connect a coding agent? Continue to [Your first chat and joining a circle](first-chat.md) or [Connect Open WebUI, Pi, OpenCode, Hermes & MCP](apps-and-agents.md). For verifiable WebAssembly compute with `plasmd`, see [PLASM](plasm.md); for decentralized image generation in active qualification, see [LUMEN](lumen.md).
