Why
A screenshot tells a coding agent roughly where something is. It then guesses which view drew it, and
the first guess is often wrong.
Every native Mac app already carries the answer in its accessibility tree: a role, a label, and often
the exact identifier the source code uses. Locant reads it. Press a hotkey, click one element in any
app, type what should change, press Enter. The clipboard now holds a Markdown payload with the
element's role, label, accessibility identifier, frame, and ancestry, plus a cropped PNG, so the agent
can grep for the right file on the first try.
Window-level tools give your agent the window. Locant gives it the element.
Measured against a screenshot of the same element, on Claude Code, graded blind. The agent had two
copies of the code and only one was on screen:
|
Locant |
Screenshot |
| Runs that edited the wrong copy |
0 of 20 |
14 of 20 |
| Time to the right file (median) |
39 s |
80 s |
| Cost per run |
$0.55 |
$1.13 |
The setup, the tasks, and every run are in the report.
One night of captures shows what a real redesign by pointing
looks like, before and after.
Install
-
Download Locant.dmg and
drag Locant to Applications. Signed with a Developer ID and notarized, so it opens like any other app.
Or, with Homebrew: brew install Malik1942/locant/locant.
Updates install from the app: when a newer version exists, Locant offers Install and Relaunch,
checks that the download is signed by the same developer, swaps it in, and reopens; the permissions
carry over. Opened from a disk image or Downloads, it offers the download instead. Copies up to
1.3.1 update through the browser one last time.
-
Launch it. There is no Dock icon; look for the pointing hand in the menu bar.
-
Allow the two permissions it asks for, in this order:
- Accessibility reads what is under your cursor and listens for the hotkey. Without it nothing works.
- Screen Recording captures the pixels of the element. macOS applies the grant only after Locant
reopens, and offers Quit & Reopen when you turn it on; take it before the first capture.
There is no third prompt. Nothing leaves the machine: no telemetry, no accounts. The one request Locant
makes is a daily check for a newer release on GitHub. When you click Install and Relaunch, it downloads
that release from GitHub. Turn the check off in Settings › General.
-
A one-page guide opens: every action, its hotkey, and the gestures on the overlay. Close it; reopen it
any time from Settings › General. The first three times each action opens, a line at the bottom of the
screen names its gestures, then fades by itself.
Use
Three seconds, start to paste.
- ⌃⌃ (double-tap Control within 350 ms) or ⌃⌥1, or click the ball. The screen freezes under the overlay.
Hover to see the highlight and the label
role · identifier. The label tells you before you click
whether the element has a declared identifier, only a label, or no accessibility tree at all.
- Click the element, or press Return while it is highlighted. Drag instead to capture a frame
with everything inside it. Option steps to the parent, and again for the next level. Hold
Shift and click to add more elements, from any app; the note then covers all of them.
- Type what should change, press Enter. The payload is on the clipboard. Esc at any point
cancels; nothing is written and the clipboard is untouched.
Paste into your agent. Each capture also lands in ~/Pictures/Locant/ as a PNG and a JSON sidecar that
validates against schema/capture.schema.json.
## Locant capture (fix)
Image: /Users/you/Pictures/Locant/locant-simulator-20260913-153012-k7q2.png
App: Simulator (com.example.myapp) · Window: iPhone 17 Pro
Captured: 2026-09-13 15:30 · Image region: 450×130 pt @2x (element + 40 pt)
Project: /Users/you/Developer/MyApp
### Target element
button · id=captureButton
Frame: x=43 y=894 w=370 h=50
Path: application > window > group > group > button#captureButton
### Note
make this rounded, match the other pills
The image path comes first because terminal agents receive only the text on paste; the path lets them
open the PNG themselves.
Or let the agent fetch it
Locant is its own MCP server. The app binary started with --mcp speaks MCP over stdio and reads the
sidecars in the capture folder; nothing to install, nothing runs until an agent starts it. Four tools:
latest_capture, list_captures, get_capture, resolve_capture. Every result is text with the image
path first; an image block is added only when the agent asks for it (include_image); there is never
structuredContent, so Codex sees the text too.
Connect from Settings › Agents: one row each for Claude Code, Cursor, and Codex, with Connect and
Disconnect. Each writes one server named locant into that agent's own user-level configuration. Or by
hand:
# Claude Code
claude mcp add --scope user locant -- /Applications/Locant.app/Contents/MacOS/Locant --mcp
# Codex
codex mcp add locant -- /Applications/Locant.app/Contents/MacOS/Locant --mcp
Cursor, in ~/.cursor/mcp.json or a project's .cursor/mcp.json; Cursor asks once whether to enable
it, and the agent CLI needs cursor-agent mcp enable locant:
{ "mcpServers": { "locant": { "command": "/Applications/Locant.app/Contents/MacOS/Locant", "args": ["--mcp"] } } }
Then say "fix what I just pointed at". The agent calls latest_capture, greps for the identifier,
edits, and may call resolve_capture, after which Locant keeps that capture past the retention period.
The server reads the folder chosen in Settings › Captures; --folder <path> names another.
In Grok Bot
Grok Bot starts MCP servers on the bot's own cloud computer, where Locant isn't, and a pasted capture
reaches it as the image alone. It can run commands on your Mac, though, and the Locant skill in
plugins/locant uses that: it starts Locant --mcp once on your Mac, reads the latest
capture, and opens its image. Set it up once:
Then point, and say "fix what I just pointed at". The first time, Grok Bot asks to run commands on your
Mac.
What it does
Point, the primary action
- Element, identifier, path. The accessibility identifier is what the agent greps for. The path
says where in the tree the element sits.
- Web pages and Electron apps too. A web node carries its DOM id and class list
(
button "Checkout" · #checkout-button · .btn.btn-primary), the path shows each ancestor's id or
first class, and the page URL is recorded; a localhost page counts as yours.
- The component and its source line, on a local React page. In Chrome, Edge, Brave, or Dia, a
capture of a page your dev server serves also names the component that drew the element, its props,
and two places in your code:
Source: …/src/Library.tsx:150:7 for the element's own JSX and
Rendered at: …/src/Library.tsx:93:24 for where the component is used. Each browser has to be allowed
once, in Settings › Captures › Web pages.
- Where it is in your code. In a fix capture Locant reads your project folder while you type the
note and looks the element up itself, so the agent starts at a file and a line:
In source: Oryne/Features/Library/LibraryView.swift:543 (the only file in the project with the string "Recent").
When several files match, the one that also holds other text from the capture is named first; when
the text is data, the line points at the fixed text beside it. A translated label is found through its
key in your .xcstrings or .strings. On a local page the browser cannot be asked about (an Electron
app you are building, or a browser Locant cannot ask), the DOM id and classes are looked up the same way; a list
of utility classes (Tailwind) is found where the whole list is written on one line, and a text node is
looked up by the element that holds it. A Position: 3 of 12 alike on screen line says where a row
sits among the rows like it.
- A ladder when there is no element. Identifier, then label, then a drawn frame with every element
inside it listed, then recognized text and the nearest labeled neighbors, then the image alone. The
payload says which rung it reached.
- Fix or reference is inferred. Anything in the iOS Simulator, anything built on this Mac, and
anything signed with your own Team ID counts as yours; the payload carries a
Project: line. My Apps
in Settings is only for what inference misses.
- Files in Pictures, tagged in Finder with Locant, the app, fix or reference, and the project.
Optionally sorted into subfolders by app, project, or month.
Four more actions, on the same gesture. Hold the ball for half a second and release on one, or use
the hotkey.
- Snap (⌃⌥2): the window under the cursor, or a dragged region, as a PNG. Option picks the
element under the cursor instead, and again its parent, up to the window. Hold ⌘ at the click to
keep it off disk.
- Text (⌃⌥3): the text in an element or a region, recognized, to the clipboard. Nothing on disk.
- Color (⌃⌥4): a magnifier follows the cursor; arrows nudge by a pixel, click copies the value.
Hex, rgb(), hsl(), or SwiftUI Color, in sRGB or Display P3.
- Cut (⌃⌥5): the subject cut onto a transparent background, from the window, a frame, or with
Option an element.
And
- Before & After. After the agent's edit, run your app again. Locant finds the same element,
captures it when it looks different, and keeps every iteration with the git diff beneath. On by
default, only for apps you build; Settings › Captures › Recapture when your app changes turns it off.
- The floating ball, a glass disc at the edge of the screen that stays out of the way until you
reach for it. Turn it off in Settings; the hotkey works either way.
- Retention. Images older than 30 days go to the Trash. Change the period, or keep everything.
- Hotkeys you record, a key with modifiers or a double-tap of one modifier, for Point and each action.
- A daily update check, and nothing else on the network beyond your own Mac: for the source line of
a local web page, Locant reads that page's source maps from the dev server it came from.