# tabcap 1.1.0

Installed from npm: `npm install -g tabcap` puts `tabcap` on your PATH; npm installs the binary for your platform from one optional dependency (`tabcap-darwin-arm64`, `tabcap-linux-x64`, `tabcap-linux-arm64` or `tabcap-win32-x64`), so do not install with `--omit=optional`. The skill ships in this package: `$(npm root -g)/tabcap/skills/tabcap/`. Step 1 below is then done.

## Install

- **npm** (any platform, Node 18 or newer): `npm install -g tabcap`. The binary for your platform comes as an optional dependency; every release is published from CI with provenance. Later: `tabcap update`.
- **Homebrew** (macOS arm64, Linux x64 and arm64): `brew install 1A7432/tabcap/tabcap`. The formula follows every release; later: `tabcap update` (it runs `brew upgrade tabcap`).
- **Release packages**: `tabcap-v<version>-darwin-arm64.tar.gz`, `-linux-x64.tar.gz`, `-linux-arm64.tar.gz` or `-windows-x64.zip` from the [release page](https://github.com/1A7432/tabcap/releases), checksums in `SHA256SUMS`; unpack and put `tabcap` (`tabcap.exe` on Windows) on your `PATH`. On macOS, after a browser download, run `xattr -d com.apple.quarantine tabcap` once.
- **From source**: Bun 1.4.3 or newer (CI uses the version in `.bun-version`) and Zig 0.16.0; `bun install && bun scripts/native.ts build` (the wire component tabcap embeds), then `bun run build`.

Then `tabcap setup` downloads Chrome for Testing (about 180 MB) into `~/.cache/tabcap`; nothing else is needed.

**Agents with a command sandbox** (Cursor's Auto-review run mode, Codex's `workspace-write`, Claude Code with `/sandbox`, Gemini CLI with `--sandbox`): Chrome cannot create its own sandbox inside theirs, and `tabcap browser start` says so. Let tabcap run outside it: put `tabcap` on the host's allowlist or excluded commands, or connect it as an MCP server (`tabcap mcp --print-config <host>`; Claude Code and Codex start MCP servers outside their sandbox, Gemini CLI inside it). Never `--no-sandbox`.

## Quick start

**1. Get a browser and start.**

```sh
tabcap setup                                 # downloads Chrome for Testing into ~/.cache/tabcap, asks nothing
tabcap daemon start && tabcap browser start  # the daemon and its own Chrome, separate profile
```

**2. Open a page and look around.**

```sh
tabcap navigate https://example.com         # opens in a background tab and waits until ready
tabcap snapshot --interactive               # the page's controls as a tree with refs (e12)
tabcap click e12                            # click by ref; waits for the navigation to settle
tabcap fill e7 alice                        # password fields show <masked> in every output
tabcap screenshot                           # saves a PNG and prints its path
```

**3. Record what the page calls.**

```sh
tabcap net start                            # records requests, bodies, WebSocket frames, console
tabcap click e9
tabcap net list --resource-types xhr,fetch  # the API calls, oldest first
tabcap net body r-11                        # one response body
tabcap net stop                             # the recording is a bundle under ~/.local/share/tabcap
tabcap daemon stop
```

Every command prints one JSON envelope on stdout: `{"ok":true,"data":…}` or `{"ok":false,"error":{"code","message","next"}}`. When a command fails, do what `next` says. `tabcap --help` lists the commands by group; `tabcap <command> --help` shows the options and an example.

**Give it to an agent.** The skill lives in `skills/tabcap/` (`SKILL.md` plus `references/`, no scripts). Copy it to `~/.claude/skills/tabcap/` for Claude Code (it also reads `~/.agents/skills/tabcap/`), or into the skills directory of Hermes Agent or another host. For hosts that speak MCP instead: `claude mcp add tabcap -- tabcap mcp`; `tabcap mcp --print-config <host>` prints the entry for Cursor, Codex, Gemini CLI, Windsurf (untested) and Claude Desktop. Then ask the agent: "open this page with tabcap and show me which APIs it calls". `tabcap guide` lists the task recipes an agent can follow (first look, scraping through the logged-in tab, encrypted sites, offline replay, login with a challenge); `tabcap status` shows everything that is going on and what is in conflict.
