# FloatPrompt for agents

The setup guide for FloatPrompt, written for agents. It covers the Mac app, its Figma plugin and its npm package, one step at a time.

## What FloatPrompt is

A Mac menu bar app for talking to agents. The person holds **fn** to dictate into any app, or double-taps **fn** to record a capture: their voice, what they point at, and screenshots, saved as a folder and handed to their agent. FloatPrompt uploads nothing. It's in beta.

**npm: install `floatprompt@beta`, never plain `floatprompt`.** Plain `floatprompt` on npm is still the old 1.x tool (step 5; it's also on its own at https://floatprompt.com/npm, to hand to an agent in a project).

## 1. Check the Mac

- `sysctl -n hw.optional.arm64` must print `1` (Apple silicon).
- `sw_vers -productVersion` must be 26 or higher.

Apple silicon on an older macOS: the person updates in System Settings › General › Software Update first. Intel: FloatPrompt doesn't run on it.

Already installed? `~/.floatprompt/bin/floatprompt app status` answers. Skip to step 3.

## 2. Install (the person does this)

FloatPrompt is in private beta. Beta testers are sent a download link. Anyone else can sign up at https://floatprompt.com to hear when it opens.

You can't install it for them: it needs their clicks and macOS's prompts. Walk them through it:

1. Open the FloatPrompt disk image they downloaded and drag FloatPrompt to Applications.
2. Open FloatPrompt from Applications. When macOS asks about an app from the internet, **Open**. When it asks for the Documents folder, **Allow**.
3. The welcome window walks through the rest: **Get Started**, the keys (**Next**), then four permissions (Microphone, Documents, Accessibility, Screen Recording: on each row that says Not Allowed, **Open Settings…** and allow it), then **Done**. If macOS asks to quit and reopen FloatPrompt, choose **Quit & Reopen**.

After that, FloatPrompt checks for updates, and they press Install.

## 3. Check it

Run `~/.floatprompt/bin/floatprompt app status` (always by that full path). It lists the permissions, the keys, speech and the plugins. FloatPrompt also installs a full guide for agents at `~/.floatprompt/AGENTS.md`: read it for anything this page doesn't cover.

Fix what `app status` shows:

- **A permission is off:** `~/.floatprompt/bin/floatprompt app setup <microphone|accessibility|screen-recording>` prints the steps, and `app open system-settings <the same>` opens the right place (ask first). Without Accessibility, fn does nothing. If it still shows off after they allow it, they quit FloatPrompt from its menu bar menu and open it again.
- **A permission is on in System Settings, but FloatPrompt shows “Needs Re-adding”** (`app status` calls it `needs-turning-on-again`)**:** macOS sometimes forgets an approval after an update, and the switch still shows on. Switching it off and on does not fix it. In System Settings › Privacy & Security › Accessibility (or Screen & System Audio Recording), they select FloatPrompt by its name, click **−** to remove it, click **+** to add it back from Applications, and switch it on. FloatPrompt’s **Open Settings…** button opens that list, and puts FloatPrompt back in it if its entry is gone. Never ask them to run a Terminal command for this.
- **Speech isn't ready:** Apple's speech model is still downloading for their Mac's language. Wait a minute and check again.
- **Another app uses fn:** `app setup fn-conflicts` names it and how to fix it.

## 4. Plugins

Ask whether they use Figma. The plugin is optional.

- **Figma** (the desktop app): run `app setup figma` and follow its steps. Done when `app status` says the Figma plugin is connected.

## 5. Their web project (the npm package)

If they build a website or web app, the `floatprompt` package connects its dev page to FloatPrompt, so captures get the elements, React components and `file:line` in any browser, including ChatGPT's built-in browser. It runs only on local dev addresses (localhost, 127.0.0.1) and never in a production build. Ask whether they want it in their project.

1. Find the project's framework (Next.js, Vite, other) and package manager.
2. Install the beta as a dev dependency: `npm install --save-dev floatprompt@beta` (or `pnpm add -D floatprompt@beta`, `yarn add -D floatprompt@beta`, `bun add -d floatprompt@beta`). The `@beta` matters: plain `floatprompt` is still the older tool.
3. Add one line:
   - Next.js (App Router): in the root layout (`app/layout.tsx` or `src/app/layout.tsx`), `import { FloatPrompt } from "floatprompt/next";` and `<FloatPrompt />` inside `<body>`.
   - Vite: in `vite.config`, `import { floatprompt } from "floatprompt/vite";` and add `floatprompt()` to `plugins`.
   - Other React: `<FloatPrompt />` from `floatprompt/react` at the app's root.
   - Anything else: `import "floatprompt";` in the entry file.
4. Start the dev server. A small chip in the page's corner says "Connected" when FloatPrompt is running.
5. Run the project's build, then `npx floatprompt check <build folder>`: it must pass, which shows the client stayed out of the build.

No install, for a quick test or a plain HTML page: one line in the page's HTML gives the same elements, components and `file:line`, since they come from the framework's own dev build: `<script src="http://127.0.0.1:47653/floatprompt.js"></script>` (the FloatPrompt app serves it, always matching its version). It stays in that file, so take it out before the page goes live. In a real project the package is better, because it switches itself off in production builds.

The package's full guide is in `node_modules/floatprompt/floatprompt.md`.

## 6. Try it

1. **Dictate:** they click into your chat box, hold fn, say a sentence and let go. The words appear; they press Return.
2. **Capture:** on a web page, they double-tap fn, talk while pointing at something, then press fn once to stop. FloatPrompt copies a `read …/capture.md` line; they paste it into your chat box, and you read that file. (A capture started in your chat box pastes there by itself.)

If either does nothing, run `app status` again and fix what it shows.

## Rules

- Go one step at a time with the person, and copy commands exactly as written.
- Ask before changing any FloatPrompt setting, editing their project, or opening anything. Reading is always fine.
- Never install the app or the plugin for them, never click macOS prompts, and never quit or relaunch FloatPrompt: that's all the person's to do.
- If `app status` says they're recording or dictating, wait until they've finished.

## Support

Email support@floatprompt.com.
