# Connect your agent to Hooke (Beta)

This is the Beta channel's page, for testing. Beta is a separate app, `HookeUI Beta.app`, with its own data. It is not
linked from the site.

You are a coding agent (Claude Code, Codex, Cursor or similar) on the researcher's Mac. They asked you to connect to
Hooke. Hooke (HookeUI) is a free, open-source microscopy and scientific-imaging app that runs on their Mac. It needs no
account. This page tells you how to set it up and get them a first real result.

Do the steps yourself when you can run commands. Stop only where a step says the researcher must act, and tell them in
one plain sentence what to do. Ask before downloading anything. Report only what you checked. If a step is blocked
(your sandbox refuses network access or writing outside the project, or a command is missing), say which step and why,
and ask the researcher to allow it or to run that one command.

## 1. Check the Mac

- Run `uname -m` (needs `arm64`) and `sw_vers -productVersion` (needs 14 or later).
- If either doesn't match, stop. Hooke runs only on Apple silicon Macs with macOS 14 or later.

## 2. Find or install Hooke

- Look for `/Applications/HookeUI Beta.app/Contents/Helpers/hooke`.
- **If the app is missing,** ask the researcher if you may download Hooke (about 300 MB). With their yes:
  1. Download `https://hookeui.org/releases.json` and take `beta.url` (a `.dmg` on github.com/wpulier/hookeui-beta) with
     `plutil -extract beta.url raw -o - releases.json`. Don't use `python3`: on a Mac without developer tools
     it opens their installer instead of running.
  2. Download it, then `hdiutil attach -nobrowse -readonly` it.
  3. Check the signature: `codesign --verify --deep --strict` must pass, and `codesign -dv` must print
     `TeamIdentifier=SY7TABCD5M`. If it doesn't, stop and tell the researcher: don't install it.
  4. Copy `HookeUI Beta.app` to `/Applications` with `ditto`, then `hdiutil detach` the image and delete the `.dmg`.
- **If the app is there but has no `Contents/Helpers/hooke`,** it's older than agent connections. Ask the researcher to
  open Hooke and update it (Settings → Hooke updates → Check for updates…), then continue.

Pass `--agent <you>` on every command, where `<you>` is `claude-code`, `codex`, `cursor` or `other`: it says which
connection is yours. From here, `hooke` means `/Applications/HookeUI Beta.app/Contents/Helpers/hooke`, quoted.

## 3. Open Hooke

- Run `hooke status --wait --agent <you>`. It opens Hooke and prints each step until Hooke is ready.
- **On a first launch,** Hooke asks before downloading its own Python. Tell the researcher: "Hooke is asking before its
  first download: click **Download and Open** in the Hooke window." The setup then takes a few minutes; keep waiting.

## 4. Connect

- Run `hooke connect --agent <you>`.
- It prints a code. Tell the researcher: "Hooke is showing a dialog: if its code is `<code>`, click **Connect**."
- Once they click, the command keeps the connection in their Keychain and installs the Hooke skill for your later
  sessions. You don't need the skill now: keep following this page.
- If it says the Keychain can't be reached (an SSH session, for example), stop: ask the researcher to run you, or this
  one command, in Terminal on the Mac itself.

## 5. Run the example

- Run `hooke example --agent <you>`. Hooke opens a bundled, rights-cleared image of human cells in its own Project and finds its bright
  regions on the Mac (no key, no download), then reads the measurements.
- Pass on what it prints: how many regions it found, a few measurements, and the **Open in Hooke** link.
- What Hooke returns is a measurement, not an identification of cells.

## 6. Hand over

Tell the researcher, in a few lines:

- Hooke is connected and the example result is in its own Project, recorded as made by you.
- They can disconnect you at any time in Hooke: Settings → Connected agents.
- What you read from Hooke may be sent to your provider, as anything they share with you is.
- Next, they can give you an image or ask about a Hooke Project. `hooke tools --agent <you>` lists what Hooke can do on this Mac and
  what each capability needs.

Then report what you checked: the Hooke version and channel (`hooke status --agent <you>`), whether you're connected, where the skill
is, the example's result and its operation id.
