Pinar
Pin comments on elements or areas in Chrome and copy the bundle (comment, DOM path, coordinates, screenshot) to the clipboard. Paste it anywhere — Grok, Claude, Codex, Slack, notes.
Chrome (Pinar + pins + ⌘↵)
│ clipboard (text/plain + text/html with images)
▼
Any composer / editor
Install
One command downloads the helper to ~/.pinar, puts the launcher in ~/.pinar/bin, and registers agent hooks. Requires Node or Bun.
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/djalmajr/pinar/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/djalmajr/pinar/main/install.ps1 | iex
The installer:
- Syncs
~/.pinar(Windows:%USERPROFILE%\.pinar) with the current runtime: recreatesbin/,lib/,hooks/, andextension/, and deletes leftover files (src/,AGENTS.md, tests, old folders) - Leaves the launcher at
~/.pinar/bin/pinar(Windows:pinar.cmd) - Adds
~/.pinar/binto PATH - Merges global hooks (does not delete hooks you already have)
- Keeps
shots/
The same command also copies the unpacked Chrome extension into that install. Chrome does not enable it for you.
Open a new terminal after installing so PATH picks up ~/.pinar/bin.
Pin a specific ref: PINAR_REF=v0.1.0 (Unix) or $env:PINAR_REF = "v0.1.0" (PowerShell) before the one-liner.
From a clone:
./bin/pinar install # macOS / Linux
.\bin\pinar.cmd install # Windows
Load the extension
Pinar is not on the Chrome Web Store. After the CLI/hooks install:
- Open Chrome and go to
chrome://extensions - Turn on Developer mode (toggle in the top-right)
- Click Load unpacked
- Select the installed folder — not a Downloads zip, not the git clone unless you are developing the extension:
- macOS / Linux:
~/.pinar/extension - Windows:
%USERPROFILE%\.pinar\extension
- macOS / Linux:
Chrome remembers that folder. After you run the installer again, open chrome://extensions and click Reload on the Pinar card if the overlay looks stale.
Usage
- Open the page you want to annotate
- Click the Pinar icon in the Chrome toolbar (pin it from the puzzle-piece menu if it is hidden)
- Click an element or drag an area, write the comment, press Enter to add
- ⌘↵ / Ctrl+Enter to copy (the toolbar shows Copied and closes)
- Enter adds the pin
- Shift+Enter inserts a newline
- Esc in the composer closes only the draft; with no draft, it clears all pins and hides the toolbar
- The extension icon only shows or hides the overlay — it does not delete pins
PNG crops go to ~/.pinar/shots (Windows: %USERPROFILE%\.pinar\shots). The extension cannot write that folder by itself — the local helper starts at session start. It tries 127.0.0.1:17373 and, if that port is taken by another process, binds the next free port through 17382. The extension looks for GET /health with {"service":"pinar"} in that range. If 17373 is already Pinar, the command exits immediately and does not start a second instance. PINAR_PORT pins the helper to a single port.
pinar # if ~/.pinar/bin is on PATH
# or, from a clone:
node src/cli.mjs
bun src/cli.mjs
./hooks/ensure.sh
.\hooks\ensure.cmd # Windows
Without the helper, the crop falls back to Downloads/pinar/.
Session hooks
Each agent has its own format. npx skills add / skills.sh does not install hooks — it only copies SKILL.md.
The one-liner above is the right path for any machine. The files in this repo also apply when a session opens in this project:
| Agent | File | Event |
|---|---|---|
| Grok | .grok/hooks/session-start.json | SessionStart |
| Claude | .claude/settings.json | SessionStart |
| Codex | .codex/hooks.json | SessionStart (commandWindows on Windows) |
| Antigravity | .agents/hooks.json | PreInvocation (no SessionStart) |
| Pi | .pi/extensions/pinar.ts | session_start |
| OMP | .omp/extensions/pinar.ts | session_start |
Extra YAML in .pi/hook/hooks.yaml and .omp/hook/hooks.yaml only runs if the pi-yaml-hooks package is installed.
A local project needs trust the first time: Grok /hooks-trust, Codex /hooks. Antigravity may prefer the workspace hooks.json over the global one — if global hooks disappear in this repo, delete .agents/hooks.json and use the global install only.
Re-register hooks without downloading again:
pinar install-hooks
# or: ./bin/pinar install-hooks
# Windows: .\bin\pinar.cmd install-hooks
AGENTS.md describes how an agent should treat the pasted text. If the copy has Screenshot: /path/to/file.png, open that file — it is a single crop with every pin.
npm test