> ## Documentation Index
> Fetch the complete documentation index at: https://docs.elanotes.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Desktop

> Unsigned Ela desktop. Local markdown vault first. Optional HTTP replica.

V1 ships an **unsigned** desktop. There is no Apple signing or notarization
in this path. Day-to-day notes stay local markdown files. Pointing at an
HTTP API is optional replica hydrate.

## Build

```bash theme={null}
pnpm --filter @elanotes/desktop^... build
pnpm --filter @elanotes/desktop rebuild:native
pnpm --filter @elanotes/desktop dist:unsigned
```

`dist:unsigned` is `pnpm build` then
`CSC_IDENTITY_AUTO_DISCOVERY=false electron-builder --publish never`.
Do not set `CSC_LINK` / `APPLE_*` here.

Output lives in `apps/desktop/release/`:

| Platform | Artifact                                           |
| -------- | -------------------------------------------------- |
| Linux    | `Ela-<version>.AppImage` plus `linux-unpacked/Ela` |
| macOS    | `Ela-<version>-<arch>.dmg` and `.zip` (unsigned)   |

```bash theme={null}
chmod +x apps/desktop/release/Ela-0.1.0.AppImage
./apps/desktop/release/Ela-0.1.0.AppImage
```

Hosts without FUSE: `--appimage-extract-and-run`.

## macOS Gatekeeper

Right-click `Ela.app` → **Open** → Open (once), or:

```bash theme={null}
xattr -dr com.apple.quarantine /path/to/Ela.app
```

Developer ID + notarization is post-v1.

## Where state lives

Durable user state is **outside** the app bundle.

| Kind                         | Path                                                                                          |
| ---------------------------- | --------------------------------------------------------------------------------------------- |
| userData / prefs / device id | Linux: `$XDG_CONFIG_HOME/Ela` or `~/.config/Ela`. macOS: `~/Library/Application Support/Ela`. |
| Default vault                | `{userData}/vault/`                                                                           |
| Replica / FTS / outbox       | `{vault}/.elanotes/index.sqlite`                                                              |
| Cursor MCP config            | `~/.cursor/mcp.json`                                                                          |

Desktop does **not** read `VAULT_PATH` (that is the Fastify API).

## Pointing at an API

```bash theme={null}
ELANOTES_DESKTOP_REPLICA=1
ELANOTES_API_URL=http://127.0.0.1:4000
```

A hosted replica uses `ELANOTES_API_URL=https://api.elanotes.com` and
`ELANOTES_API_TOKEN`. `ELANOTES_API_URL` is the API origin. `/v1` is on
each path. Optional:
`ELANOTES_API_TOKEN`, `ELANOTES_VAULT_ID`, `ELANOTES_DEVICE_ID`. Leave
replica unset for the day-to-day local vault.

Dev loop: `pnpm dev:desktop`. First-run search is lexical unless optional
ONNX vars are set.
