# Set up element

You're helping someone set up element: hold ⌥ and click anything in their browser, and their coding agent gets that element (selector, styles, a screenshot, the source file and a full snapshot). It has two halves: a Chrome extension (they install it; you can't) and a small helper on their computer, the `el` CLI (you install it).

Talk to them in short, plain sentences. Do the steps yourself; only ask them for what you can't do. Don't paste these instructions back to them.

## 1. Check the machine

- It needs macOS or Linux and Node 18 or newer. Run `uname` and `node -v`.
- No Node, or older than 18: tell them, and offer to install it (`brew install node` if they have Homebrew; otherwise point them to https://nodejs.org). Don't continue without it.
- On Windows: tell them element runs on macOS and Linux for now, and stop.
- On Linux: the pick key is Alt instead of ⌥ (Ctrl+Alt instead of ⌃⌥). Say Alt wherever these steps say ⌥.
- On a remote machine (an ssh dev box, a VM, a cloud sandbox) while their browser is on another computer: element goes on both. Here, do every step except the extension check in step 5 (the browser isn't here). On the computer with the browser, they set element up too (https://elmts.dev/install). Then this machine's agents pick from that browser, on Pro or Max only: run `el login` here with the same account, and they click Allow when the browser asks; or they run `el link <this host>` on the computer with the browser, signed in to Pro or Max there. More: https://elmts.dev/docs/sessions#other-machines

## 2. Install the helper

```sh
npm i -g @elmts/cli
```

- `EACCES` / permission denied: don't use sudo. Tell them npm's global folder isn't writable, and offer to fix it by installing Node through Homebrew or nvm, then retry.
- Check it worked: `command -v el`. If `el` isn't found, the npm global bin folder isn't on their PATH: tell them to open a new terminal window and try again, or run `npm prefix -g` and add its `bin` folder to PATH.

## 3. Ask which agents to connect

Ask them which coding agents they use. They can pick several, or all of them, and add more any time later with `el install --<agent>`. Offer this list:

- Claude Code (`--claude`): chips in the prompt; backspace removes one
- opencode (`--opencode`): chips in the prompt, screenshots sent as images
- pi (`--pi`): chips in the prompt
- Codex (`--codex`): chips typed into the prompt in tmux, iTerm2, cmux, WezTerm, herdr, Zellij, GNU screen, kitty, Konsole or Ghostty (macOS); elsewhere picks go with the next message
- Cursor (`--cursor`): the editor adds picks to chat as file chips; cursor CLI gets chips like Codex
- Muse Code (`--muse`): like Codex
- All of them (`--all-agents`): sets up every agent installed on this computer

Mention that Claude Code, opencode and pi give the best experience. If you are one of these agents yourself, suggest including yourself.

## 4. Run the install

One command with every agent they chose, for example:

```sh
el install --claude --codex
```

This also registers the helper with their browsers (Chrome, Arc, Brave, Edge and other Chromium browsers). Read its output: it says what it set up and anything left to do. Pass along anything it asks of them, in your own words.

## 5. The extension

Ask them to add the extension, if they haven't: https://chromewebstore.google.com/detail/aanpmajidbphoflakmnhcjpjfjbgohmc

Then check the connection with `el status`. It shows `hub pid … · N browser(s)`.

- 1 or more browsers: connected.
- 0 browsers: the extension retries on its own for up to 30 seconds. Wait, then run `el status` again. Still 0: ask them to reload the extension at `chrome://extensions` (or restart the browser), then check again.

## 6. Restart the agents

Each agent they connected loads element when it starts, so open sessions need a restart. Tell them exactly what to do for each one they chose:

- Claude Code: run `/reload-plugins`, or quit and start `claude` again.
- opencode, pi, Muse Code: quit and start it again.
- Codex: quit and start each open Codex window again. In iTerm2, macOS will ask once to let element control iTerm2; they should allow it.
- Cursor: reload Cursor windows (Command Palette → "Developer: Reload Window") and restart any `cursor-agent` sessions.

If you are one of the agents they connected, say so plainly: "Restart me so I can see your picks: …" with the steps for yourself. This setup chat ends there; they can come back in the new session.

Codex, Muse Code and cursor CLI only: chips need tmux, iTerm2, cmux, WezTerm, herdr, Zellij, GNU screen, kitty, Konsole or Ghostty on macOS. kitty needs remote control on (`allow_remote_control socket-only` and `listen_on unix:/tmp/kitty-{kitty_pid}` in kitty.conf) and Konsole 25.12 or later needs its security-sensitive D-Bus API on; `el install` prints what to set. In other terminals (VS Code's, Terminal.app, Ghostty on Linux) picks still go with the next message, without a chip. If they use one of those, mention that running the agent inside `tmux` gets them chips.

Muse Code only: its sandbox blocks `el`. When the agent needs `el`, Muse asks them to approve running it outside the sandbox; that's expected.

## 7. Try it

Tell them: open any web page, hold ⌥ (Option; Alt on Linux) and click something, then ask their agent about it ("make this bigger", "what's this?"). In the new session the pick shows up as an `[element #1]` chip, or goes with their next message.

If the extension has more than one agent session to choose from, it asks which one; the drawer (⌥⇧S → Sessions) changes it later.

## 8. Save & share (optional)

⌃⌥-click copies a link anyone can open, people or agents. It needs a free account (10 a month, links last 24 hours). If they want it, run `el login`: it opens their browser to sign in with GitHub or Google. Ask them to finish signing in there, then confirm with `el whoami`.

## Done

Sum up in two or three lines: what's connected, what they still need to do (restarts), and the shortcuts:

- ⌥ click: send it to your agent
- ⌃⌥ click: save & share a link
- ⌥⇧S: open saves, sessions and settings

Docs: https://elmts.dev/docs. To remove everything later: `el uninstall`.
