clawdcursor
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Check it deeper on your machine
It has changed since its scan on 17 Nov 2026. Its scripts were only partly scanned.
As a Claude Code plugin, install it and then ask Claude Code:
/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/AmrDab/clawdcursor with scanskillsafety
Or from a terminal, clone it and run it:
git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/AmrDab/clawdcursor'
It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.
Badge for your README
Markdown
[](/listings/amrdab--clawdcursor)HTML
<a href="/listings/amrdab--clawdcursor"><img src="/api/listings/amrdab--clawdcursor/badge.svg" alt="findsafeskills safety rating" /></a>Install
Install instructions from the README
As written by the repo's author. findsafeskills has not verified these steps.
Pick your host. Each one needs the one-time desktop-control consent, and on macOS the Accessibility and Screen Recording permissions ([macOS setup](docs/MACOS-SETUP.md)).
Claude Code: the plugin
claude plugin marketplace add AmrDab/clawdcursor claude plugin install clawdcursor@clawdcursor
The plugin registers the MCP server (through `npx`, so no separate install; Node.js 20+ required) and bundles the usage skill. The first tool call asks "Allow clawdcursor to control this computer" in the app.
Claude Desktop: the .mcpb extension
Download the extension for your OS from the [latest GitHub release](https://github.com/AmrDab/clawdcursor/releases/latest) and open it:
| Windows | macOS | Linux | |---|---|---| | [clawdcursor-win32.mcpb](https://github.com/AmrDab/clawdcursor/releases/latest/download/clawdcursor-win32.mcpb) | [clawdcursor-darwin.mcpb](https://github.com/AmrDab/clawdcursor/releases/latest/download/clawdcursor-darwin.mcpb) | [clawdcursor-linux.mcpb](https://github.com/AmrDab/clawdcursor/releases/latest/download/clawdcursor-linux.mcpb) |
1. Double-click the file, or use **Settings → Extensions → Advanced settings → Install Extension…**. 2. Turn on **Allow clawdcursor to control this computer**. That is the consent; until it is on, every tool returns a consent prompt. 3. **macOS:** when asked, allow Claude under **Privacy & Security → Accessibility** and **Screen Recording**.
No Node.js, npm or JSON editing: Claude Desktop runs the bundled server.
Codex, Cursor and other MCP hosts: `clawdcursor mcp --compact`
Install once:
npm i -g clawdcursor # Node.js 20+ clawdcursor consent --accept # one-time desktop-control consent clawdcursor grant # macOS only: Accessibility + Screen Recording
Then register a stdio server whose command is `clawdcursor mcp --compact`. The host starts it; you never run it yourself. Only the config shape differs:
**OpenAI Codex** (`~/.codex/config.toml`; the first launch can take a few seconds, so raise the 10 s startup timeout):
[mcp_servers.clawdcursor] command = "clawdcursor" args = ["mcp", "--compact"] startup_timeout_sec = 30
**Cursor, Windsurf, Cline, Gemini CLI, Claude Desktop without the extension** (`mcpServers`):
{
"mcpServers": {
"clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] }
}
}**VS Code (Copilot)** (`.vscode/mcp.json` uses `servers`, not `mcpServers`):
{
"servers": {
"clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] }
}
}**Zed** (`context_servers` in `settings.json`):
{
"context_servers": {
"clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] }
}
}**opencode** (`opencode.json` uses `mcp`, and `command` is an array):
{
"mcp": {
"clawdcursor": { "type": "local", "command": ["clawdcursor", "mcp", "--compact"] }
}
}**Claude Code without the plugin:**
claude mcp add clawdcursor -s user -- clawdcursor mcp --compact
One-click for Cursor and VS Code (these use `npx`, no global install):
Notes:
- **No global install:** use `npx` as the command with args `-y clawdcursor mcp --compact`. A global install is still the better choice for a tool with desktop control: the version is pinned and on disk, and on macOS the native helper is built at install time. - **Windows:** some hosts start the server without a shell and cannot find `clawdcursor` or `npx` (both are `.cmd` shims). If the server does not start, wrap it: `"command": "cmd", "args": ["/c", "clawdcursor", "mcp", "--compact"]`. - **Consent in the app:** hosts that support MCP elicitation (Claude Code, VS Code) ask for consent on the first tool call, so `consent --accept` can be skipped there.
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
.claude-plugin/marketplace.json · Manifest · 29 lines
- {
- "name": "clawdcursor",
- "owner": {
- "name": "Amr Dabbas",
- "url": "https://github.com/AmrDab"
- },
- "metadata": {
- "description": "Cross-OS desktop & browser control for AI agents, through the accessibility tree first and screenshots last — the fallback execution layer for when APIs, CLIs, and direct integrations aren't available.",
- "version": "1.0.0"
- },
- "plugins": [
- {
- "name": "clawdcursor",
- "source": "./",
- "description": "Cross-OS desktop & browser control, through the accessibility tree first and screenshots last — the fallback execution layer for when APIs, CLIs, and direct integrations aren't available. Registers the clawdcursor MCP server (compact tool surface) and bundles its usage skill. Launches via npx, so no separate install step is required.",
- "version": "2.1.0",
- "homepage": "https://clawdcursor.com",
- "license": "MIT",
- "keywords": [
- "mcp",
- "desktop-automation",
- "computer-use",
- "gui-automation",
- "accessibility",
- "fallback"
- ]
- }
- ]
- }
README.md · README · 502 lines · 2 findings marked
- <h1 align="center">Clawd Cursor</h1>
- <p align="center">
- <strong>Lets AI use your computer in real time.</strong><br>
- clawdcursor picks the fastest way into each app: the page itself in browsers, the accessibility tree in desktop apps, text recognition when there's no tree, and screenshots last. After every action it tells your AI whether it worked.
- </p>
- <p align="center">
- <a href="LICENSE"><img src="https://img.shields.io/github/license/AmrDab/clawdcursor?color=a855f7" alt="MIT license"></a>
- <a href="https://github.com/AmrDab/clawdcursor/releases/latest"><img src="https://img.shields.io/github/v/release/AmrDab/clawdcursor?color=22c55e&label=release" alt="Latest release"></a>
- <a href="https://www.npmjs.com/package/clawdcursor"><img src="https://img.shields.io/npm/v/clawdcursor?color=cb3837&logo=npm" alt="npm"></a>
- <img src="https://img.shields.io/badge/node-%E2%89%A520-339933?logo=nodedotjs&logoColor=white" alt="Node 20+">
- <img src="https://img.shields.io/badge/platform-win%20%7C%20mac%20%7C%20linux-0ea5e9" alt="Cross-platform">
- <a href="https://glama.ai/mcp/servers/AmrDab/clawdcursor"><img src="https://glama.ai/mcp/servers/AmrDab/clawdcursor/badges/score.svg" alt="clawdcursor MCP server on Glama" height="20"></a>
- <a href="https://github.com/AmrDab/clawdcursor/actions/workflows/cross-platform.yml"><img src="https://img.shields.io/github/actions/workflow/status/AmrDab/clawdcursor/cross-platform.yml?branch=main&label=tests" alt="Tests"></a>
- <a href="https://discord.gg/hW29nrEZ8G"><img src="https://img.shields.io/badge/Discord-join-5865F2?logo=discord&logoColor=white" alt="Discord"></a>
- </p>
- <p align="center">
- <a href="#what-it-does">What it does</a> ·
- <a href="#proof">Proof</a> ·
- <a href="#how-it-works">How it works</a> ·
- <a href="#limits">Limits</a> ·
- <a href="#what-protects-you">What protects you</a> ·
- <a href="#error-reports">Error reports</a> ·
- <a href="#install">Install</a> ·
- <a href="CHANGELOG.md">Changelog</a>
- </p>
- ---
- ## What it does
- Clawd Cursor is a free, open-source (MIT) MCP server. Your AI (Claude, Codex, Cursor, a local model, any MCP client) connects to it and gets six tools to use a real Windows, macOS or Linux computer: `accessibility`, `system`, `window`, `browser`, `computer` and `batch`.
- It sees the parts of an app by name, through the same data screen readers use: "Email field", "Confirm button". Your AI acts on those parts by name: type into Email, press Confirm, choose High. After each change Clawd Cursor reads the result back and reports `confirmed`, `unverified` or `failed`. Text is read exactly.
- Clawd Cursor has no model and no API key of its own: your AI makes every decision. Use it for the steps that only exist in a GUI. If an API, a command-line tool or a file edit does the job, use that instead.
- ---
- ## Proof
- Our own benchmark: the Codex agent on Windows, 15 tasks.
- | Measure | Result |
- |---|---|
- | Tasks done | 14 of 15 |
- | Acted by name | about 100% where the app has an accessibility tree |
- | Within the call budget | 12 of 15 |
- | Screenshots | 4 in total, all on the two drawing-canvas tasks (the fewest those tasks allow) |
- | Loops | 0 |
- | False "ok" | 1 found (an action reported as done that was not): fixed on main, ships in the next release |
- The scope is narrow: one OS, one agent, 15 tasks we built for the test. macOS, Linux and other models are not measured yet. From 2.1 the same benchmark runs on all three systems with several models, and a release ships only when it passes. How it measures: [bench/README.md](bench/README.md).
- ---
- ## How it works
- Your AI tries these in order and uses the first that works. Your AI makes every decision; Clawd Cursor carries it out and checks it.
- 1. **The page itself, in Clawd Cursor's own browser window.** `browser navigate` opens Chrome or Edge with its own profile and connects to it through Playwright; your AI then reads and clicks the page from the inside. A page already open in your own browser is read through the accessibility tree.
- 2. **The accessibility tree, in desktop apps and your own browser.** Apps list their buttons, fields and menus by name for screen readers. Clawd Cursor reads that list and acts on each part by name.
- 3. **Text recognition (OCR), when there is no tree.** It reads the words on the screen and can click a visible label.
- 4. **Screenshots, last.** Only when nothing else works, such as on drawing canvases and 3D views.
- After every action the result ends with one status line: `confirmed` (it saw the change), `unverified` (nothing could check it), `refused` (a protection stopped it) or `failed` (with a code and the next call to try). Pass `expect` on an action that matters: the call re-reads the screen and reports a `DEVIATION` if the expected state is not there.
- ```mermaid
- flowchart TB
- agent["Your AI (in its host)<br/>plans · chooses tools · checks results"] --> see{"SEE: the fastest way in first"}
- see -- "own browser window" --> page["browser navigate, then read_text<br/>the web page itself, through Playwright"]
- see -- "desktop app or your browser" --> tree["accessibility read_tree · system copy_all_text<br/>element names, positions, exact text"]
- see -- "no tree" --> ocr["system ocr<br/>the words on screen"]
- see -- "last" --> shot["computer screenshot<br/>sends an image to the model"]
- page --> act
- tree --> act
- ocr --> act
- shot --> act
- act["ACT: by name first<br/>invoke · set_value · smart_click · then click x,y"] --> guards
- guards["Always checked<br/>Stop · pause · AI-assistant window · hard key list"] -- ok --> desktop["Real desktop"]
- guards -- refused --> refused["refused, with a reason"]
- desktop --> result["Result line<br/>confirmed · unverified · refused · failed"]
- result --> agent
- ```
- In tool terms:
- - **See.** `accessibility read_tree` lists a window's parts by name, `system copy_all_text` gives the exact text of a page or document, and `system ocr` reads the screen when the tree is empty. `computer screenshot` and its variants (`screenshot_region`, `zoom`) come last: they are the only reads that put an image in the model's context. On a page your AI opened with `browser navigate`, `browser read_text` reads the page itself.
- - **Act.** `accessibility invoke` clicks a part by name and `set_value` fills a field. If the name is not in the tree, `smart_click` finds the visible label by OCR. `compile_ui`, `find_button` and `find_field` return an `{element_id, snapshot_id}` pair that stays valid when the layout shifts. A click at a screen position is for a target with no name and no visible text.
- - **Keys.** The server tells your AI which OS it is on. `mod` means `cmd` on macOS and `ctrl` on Windows and Linux.
- ### The words, in plain terms
- - **MCP** (Model Context Protocol): the standard way to plug tools into an AI app. Clawd Cursor is the tool side; your AI app connects to it.
- - **Accessibility tree:** the list of buttons, fields and menus an app gives the system, each with a name. Screen readers for blind people use the same list.
- - **Acting by name:** pressing "Send" because it is called Send, not because it sits at a spot on the screen.
- - **OCR:** text recognition, reading the words in a picture of the screen. It runs on your computer.
- - **Playwright and CDP:** Playwright is a library that controls Chrome and Edge from the inside, over the Chrome DevTools Protocol (CDP), the browser's own debugging connection. Apps built on a browser engine (Electron or WebView2) can be reached the same way; `system detect_webview` finds them.
- - **Compact tools:** the six tools your AI sees with `--compact`. Without it there are 89 smaller tools, one per action. See [The tools](#the-tools).
- - **The pill and the outline:** while your AI is working, a pill on screen says what it is doing ("Typing in Edge") and a thin amber outline marks the window it is working in, moving with it from window to window; it turns blue while your AI waits for you. Clicks go through it, and it stays out of your AI's screenshots.
- ---
- ## Limits
- - It depends on apps exposing accessibility info. Most do: web pages, native apps, Office and system dialogs.
- - Apps that draw their own screen (drawing canvases, games, CAD viewports) have no named parts. There it needs OCR or screenshots.
- - The benchmark covers Windows and one agent so far. macOS and Linux are supported but not benchmarked yet.
- - It acts with your permissions, and it has no built-in policy engine: see [What protects you](#what-protects-you).
- ---
- ## What protects you
- Clawd Cursor runs with **your own OS permissions**: anything you can do with a mouse and a keyboard, your AI can do through it.
- What is enforced, whatever your AI sends:
- - **A Stop button.** Press Stop on the pill (or double-click it), or run `clawdcursor stop`. Every Clawd Cursor process stops, including a call or batch already running, and stays stopped across restarts until you resume.
- - **The pause card.** For a sign-in or a 2FA code your AI hands that one step to you with `system pause_for_user`: a card on screen says what is needed and can offer choices or a text box, and your AI continues when you click Resume, or as soon as its `done_when` condition shows on screen. While the card is up, no other tool call runs. A choice or a typed reply on the card comes only from you: your AI cannot click its own card or the pill. On the granular surface an agent can also end a pause with `resume_task`; that is reported as unverified, never as your answer.
- - **No typing into AI assistant windows.** Input is refused when the window in front is an AI assistant your AI did not focus or open on purpose, or is no longer the window it was working in.
- - **Password values are never read.** Password field values are never returned by tree, find or value reads on Windows, macOS and Linux. A screenshot or OCR can still show whatever is visible on screen.
- - **A short list of keys that are never sent**, because they lock the machine or end the session. Windows: `Win+L`, `Ctrl+Alt+Del`. macOS: `Ctrl+Cmd+Q`, `Cmd+Shift+Q`, anything with Power or Eject. Linux: `Super+L`, `Ctrl+Alt+Del`, `Ctrl+Alt+Backspace`, `Ctrl+Alt+F1`–`F12`, SysRq, Power. Every other shortcut is allowed.
- - **Local only, with a token.** `clawdcursor agent` binds `127.0.0.1` only and requires the bearer token. `clawdcursor mcp` (stdio) opens no port.
- - **Screen text is marked as data.** Page text, OCR, the clipboard, titles and element names reach your AI inside `<untrusted-screen-content>` or quoted, and cannot break out of that wrapping. Whether the model obeys text it reads is the model's and the host's side of prompt-injection defence.
- - **One-time consent.** No tool runs until you accept once.
- What is not enforced by Clawd Cursor:
- - **There is no built-in policy engine.** Clawd Cursor does not decide which actions your AI may take, and nothing is refused for being "destructive". Your AI and your MCP host's approval prompts decide. (The policy gate of 1.x was removed in 2.0 because a click by coordinates went around it.)
- - **Per-action approval is your host's job.** The tools carry `readOnlyHint` / `destructiveHint` annotations for hosts that prompt. Approving a Clawd Cursor tool in a host means approving desktop control with your rights, not one narrow action. On the compact surface all six tools are marked destructive, because each covers many actions; the granular surface has one hint per action.
- - **If your host auto-approves tool calls, nothing asks before an irreversible action.** Your AI is instructed to ask on the pause card before sending, deleting, paying or closing unsaved work that you did not ask for, but that is an instruction, not a check. For agents you do not fully trust, or for unattended runs, use a host with approval prompts, or, from 2.1, turn on confirm mode ([#373](https://github.com/AmrDab/clawdcursor/issues/373)): with `CLAWD_CONFIRM=1` in the server's environment (in the Claude Desktop extension, the "Ask before Send / Delete / Pay / Close" setting), a click or key that would send, delete, pay or close waits on the pause card until you click Resume. Its limits are in [SECURITY.md](SECURITY.md).
- - **An agent with its own shell** on your machine is not confined by Clawd Cursor at all.
- Privacy:
- - **No model calls.** Screenshots and screen text go only to the MCP client that asked for them. `clawdcursor report` is opt-in and previews what it sends. For the error reports that start in 2.1, see [Error reports](#error-reports).
- - **No screenshots, if you want.** `clawdcursor agent --no-vision`, or `CLAWD_DISABLE_VISION=1` (which also covers stdio), refuses every call that would return an image; your AI works from the accessibility tree and OCR text.
- - **Logs.** `~/.clawdcursor/logs/` records which tool ran and whether it worked, not typed text or screen content.
- - **Pauses.** A pause times out after 15 minutes (`CLAWD_PAUSE_TIMEOUT_MIN`). `CLAWD_NO_PAUSE=1` turns pausing off for CI and unattended runs.
- [SECURITY.md](SECURITY.md) has the threat model, the limits of each guarantee, and how to report a vulnerability privately.
- ---
- ## Error reports
- 2.0.0 sent nothing. **From 2.1**, Clawd Cursor sends anonymous error reports by default, so bugs get found and fixed. Every value is a number or comes from a fixed list, and tool and action names are Clawd Cursor's own.
- - **With every report:** a random install id made on your computer (not derived from your hardware or accounts), the Clawd Cursor version and your OS family.
- - **`start`, when the server starts:** OS major version, CPU architecture, Node.js major version, which AI app started it (from a fixed list: Claude Code, Claude Desktop, Cursor, Codex and others; anything else is "other"), and compact or granular tools.
- - **`call_failed`, when a call fails, times out or reads nothing:** the tool and action name, the result code (`NOT_FOUND`, `TIMEOUT`, ...), the outcome, how long it took, and whether the app was a browser, an Electron app or a native app.
- - **`slow_call`, when a call takes over 10 seconds:** the tool and action name, how long it took, and its slow internal steps (Clawd Cursor's own helper programs, by name, with their time).
- - **`exit`, when the server exits during a call, or was killed or crashed:** the exit reason (from a fixed list: `sigterm`, `host_gone`, ...), and the tool and action that were cut off and how long they had run.
- - **`crash`, on an uncaught error:** the error class (`TypeError`, ...), the error code (`ENOENT`, ...), and the stack reduced to file and line in Clawd Cursor's own code.
- - **Never sent:** error messages, typed text, the clipboard, screen or OCR text, screenshots, window titles, the names of the apps your AI works in, URLs, element names, file paths outside Clawd Cursor, user names, emails or IP addresses.
- - **Where it goes:** over HTTPS to `telemetry.clawdcursor.com`, a Cloudflare Worker run by the project. It checks every event against the same fixed lists and drops anything else, does not read or store your IP address or request headers, and deletes events after 90 days.
- - **To turn them off:** run `clawdcursor optout` (`clawdcursor optin` turns them back on), ask your AI (it calls `system {action:"telemetry_optout"}`; your AI can only turn them off), or set `CLAWD_TELEMETRY=0` or `DO_NOT_TRACK=1`. They are always off in CI and in test runs.
- From 2.1, `clawdcursor telemetry` prints the status and every field it sends. The same list is in [docs/telemetry.md](docs/telemetry.md).
- ---
- ## Install
- Pick your host. Each one needs the one-time desktop-control consent, and on macOS the Accessibility and Screen Recording permissions ([macOS setup](docs/MACOS-SETUP.md)).
- ### Claude Code: the plugin
- ```bash
- claude plugin marketplace add AmrDab/clawdcursor
- claude plugin install clawdcursor@clawdcursor
- ```
- The plugin registers the MCP server (through `npx`, so no separate install; Node.js 20+ required) and bundles the usage skill. The first tool call asks "Allow clawdcursor to control this computer" in the app.
- ### Claude Desktop: the .mcpb extension
- Download the extension for your OS from the [latest GitHub release](https://github.com/AmrDab/clawdcursor/releases/latest) and open it:
- | Windows | macOS | Linux |
- |---|---|---|
- | [clawdcursor-win32.mcpb](https://github.com/AmrDab/clawdcursor/releases/latest/download/clawdcursor-win32.mcpb) | [clawdcursor-darwin.mcpb](https://github.com/AmrDab/clawdcursor/releases/latest/download/clawdcursor-darwin.mcpb) | [clawdcursor-linux.mcpb](https://github.com/AmrDab/clawdcursor/releases/latest/download/clawdcursor-linux.mcpb) |
- 1. Double-click the file, or use **Settings → Extensions → Advanced settings → Install Extension…**.
- 2. Turn on **Allow clawdcursor to control this computer**. That is the consent; until it is on, every tool returns a consent prompt.
- 3. **macOS:** when asked, allow Claude under **Privacy & Security → Accessibility** and **Screen Recording**.
- No Node.js, npm or JSON editing: Claude Desktop runs the bundled server.
- ### Codex, Cursor and other MCP hosts: `clawdcursor mcp --compact`
- Install once:
- ```bash
- npm i -g clawdcursor # Node.js 20+
- clawdcursor consent --accept # one-time desktop-control consent
- clawdcursor grant # macOS only: Accessibility + Screen Recording
- ```
- Then register a stdio server whose command is `clawdcursor mcp --compact`. The host starts it; you never run it yourself. Only the config shape differs:
- **OpenAI Codex** (`~/.codex/config.toml`; the first launch can take a few seconds, so raise the 10 s startup timeout):
- ```toml
- [mcp_servers.clawdcursor]
- command = "clawdcursor"
- args = ["mcp", "--compact"]
- startup_timeout_sec = 30
- ```
- **Cursor, Windsurf, Cline, Gemini CLI, Claude Desktop without the extension** (`mcpServers`):
- ```json
- {
- "mcpServers": {
- "clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] }
- }
- }
- ```
- **VS Code (Copilot)** (`.vscode/mcp.json` uses `servers`, not `mcpServers`):
- ```json
- {
- "servers": {
- "clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] }
- }
- }
- ```
- **Zed** (`context_servers` in `settings.json`):
- ```json
- {
- "context_servers": {
- "clawdcursor": { "command": "clawdcursor", "args": ["mcp", "--compact"] }
- }
- }
- ```
- **opencode** (`opencode.json` uses `mcp`, and `command` is an array):
- ```json
- {
- "mcp": {
- "clawdcursor": { "type": "local", "command": ["clawdcursor", "mcp", "--compact"] }
- }
- }
- ```
- **Claude Code without the plugin:**
- ```bash
- claude mcp add clawdcursor -s user -- clawdcursor mcp --compact
- ```
- One-click for Cursor and VS Code (these use `npx`, no global install):
- [](https://cursor.com/install-mcp?name=clawdcursor&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsImNsYXdkY3Vyc29yIiwibWNwIiwiLS1jb21wYWN0Il19)
- [](https://vscode.dev/redirect/mcp/install?name=clawdcursor&config=%7B%22name%22%3A%22clawdcursor%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22clawdcursor%22%2C%22mcp%22%2C%22--compact%22%5D%7D)
- Notes:
- - **No global install:** use `npx` as the command with args `-y clawdcursor mcp --compact`. A global install is still the better choice for a tool with desktop control: the version is pinned and on disk, and on macOS the native helper is built at install time.
- - **Windows:** some hosts start the server without a shell and cannot find `clawdcursor` or `npx` (both are `.cmd` shims). If the server does not start, wrap it: `"command": "cmd", "args": ["/c", "clawdcursor", "mcp", "--compact"]`.
- - **Consent in the app:** hosts that support MCP elicitation (Claude Code, VS Code) ask for consent on the first tool call, so `consent --accept` can be skipped there.
- - **Per-OS requirements.** Windows: none. macOS: Xcode Command Line Tools (`xcode-select --install`) to build the native helper. Linux: `tesseract-ocr` (OCR), `python3-gi` and `gir1.2-atspi-2.0` (accessibility tree), and on Wayland `ydotool`.
- - **Permission allowlists:** use the server-level wildcard `mcp__clawdcursor`, not per-tool entries.
- <details>
- <summary>Installer scripts (they run <code>npm i -g clawdcursor</code> after checking Node and PATH)</summary>
- ```powershell
- # Windows (PowerShell)
- powershell -c "irm https://clawdcursor.com/install.ps1 | iex"
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 276 on GitHub
- ```
- ```bash
- # macOS / Linux
- curl -fsSL https://clawdcursor.com/install.sh | bash
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 280 on GitHub
- ```
- </details>
- ### Over HTTP: `clawdcursor agent`
- For an agent that speaks MCP over HTTP (a headless process, the Agent SDK, your own loop):
- ```bash
- clawdcursor agent --compact # HTTP MCP on 127.0.0.1:3847/mcp
- ```
- Every request needs the bearer token in `~/.clawdcursor/token`. The server binds to `127.0.0.1` only; to reach it from another machine, tunnel the port over SSH (`ssh -L 3847:127.0.0.1:3847 user@host`). Use the daemon's own port on your side too: the server answers only requests addressed to `127.0.0.1:<its port>` or `localhost:<its port>`, so a tunnel from another local port gets 403.
- ```bash
- # List the tools. The Accept header is required by MCP's Streamable HTTP transport.
- curl -s -X POST http://127.0.0.1:3847/mcp \
- -H "Authorization: Bearer $(cat ~/.clawdcursor/token)" \
- -H "Content-Type: application/json" \
- -H "Accept: application/json, text/event-stream" \
- -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
- ```
- ```powershell
- # Windows PowerShell 5.1
- $token = (Get-Content "$env:USERPROFILE\.clawdcursor\token" -Raw).Trim()
- $headers = @{ Authorization = "Bearer $token"; Accept = "application/json, text/event-stream" }
- $body = '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
- Invoke-RestMethod -Method Post -Uri http://127.0.0.1:3847/mcp -Headers $headers -ContentType "application/json" -Body $body
- ```
- ### Updating
- | Installed as | Update with |
- |---|---|
- | Global npm package | `npm i -g clawdcursor@latest` |
- | Claude Desktop extension | Download the new `.mcpb` from the [latest release](https://github.com/AmrDab/clawdcursor/releases/latest) and open it |
- | Claude Code plugin | `claude plugin marketplace update clawdcursor`, then `claude plugin update clawdcursor@clawdcursor` |
- Restart the host afterwards so it starts the new server. `clawdcursor versions` lists every copy on the machine and its version. From 2.1, `clawdcursor update` updates the global npm package and lists the other copies that need their own update.
- **Coming from 1.x:** remove calls to the `task` tool and to `clawdcursor task`, drop the `--provider`, `--model`, `--base-url` and `--api-key` flags and the `AI_API_KEY` / `CLAWD_*_MODEL` variables, and configure the model in your agent host. Old config files still load; the model keys in them are ignored.
- ---
- ## What's new
- **2.0.0** — **A tool, driven by your agent.** First published as 1.6.0 and renumbered because it is a breaking change; 1.6.0 is deprecated on npm. ([full changelog](CHANGELOG.md))
- - **Breaking:** the built-in agent loop and all model settings are gone. The `task` tool, `clawdcursor task`, the scheduler and the `--provider` / `--model` / `--api-key` flags are removed, and `clawdcursor doctor` is a diagnostic only. Your agent calls the six tools step by step, or `batch` for a known sequence.
- - **Breaking:** the policy gate is gone: no tiers, no "confirm", nothing refused by label. See [What protects you](#what-protects-you) for what is still enforced, and what is not.
- - A thin outline around the window the agent is working in replaces the full-screen glow.
- - Keys follow the OS: the agent is told its modifier (`cmd` or `ctrl`) up front, `mod` means that modifier, and shortcuts are offered only for this OS.
- - Screen text that reaches the agent cannot close its `<untrusted-screen-content>` block, and `open_app` only starts an installed app by name.
- **1.5.27** — Ticks, dropdowns and expanders read and change the same way on all three OSes; a stop also blocks hover, clipboard writes, page script and tab switches; logs in `~/.clawdcursor/logs/` record each call's timing and outcome without typed text or window titles.
- Earlier releases are in the [changelog](CHANGELOG.md).
- **2.1.** One standard benchmark across app types, OSes and models becomes the release gate, with five general mechanisms behind it: honest results, target resolution, perception without a tree, screen geometry and timing. The first three are in 2.1, and so are an opt-in confirm mode ([#373](https://github.com/AmrDab/clawdcursor/issues/373)), `clawdcursor update`, anonymous error reports and an orb in the pill; the thin outline around the agent's window stays as in 2.0. Screen geometry and timing are next: see the [2.1 milestone](https://github.com/AmrDab/clawdcursor/milestone/1).
- ---
- ## The tools
- Two surfaces run the same code behind the same guards.
- - **Compact** (`--compact`, recommended): six tools, each with an `action` parameter. About 7,000 tokens of `tools/list`.
- - **Granular** (the default without `--compact`): 89 tools, one per action. About 19,000 tokens. Use it when a runtime needs every primitive as its own tool, or when you want your host to prompt per kind of action.
- (Token figures are the `tools/list` JSON of 2.0.0, characters ÷ 3.5.)
- | Tool | Actions |
- |---|---|
- | `accessibility` | `read_tree`, `find`, `get_element`, `focused`, `invoke`, `focus`, `set_value`, `get_value`, `expand`, `collapse`, `toggle`, `select`, `state`, `list_children`, `wait_for`, `compile_ui`, `find_button`, `find_field`, `smart_click`, `smart_type`, `smart_read` |
- | `system` | `clipboard_read`, `clipboard_write`, `copy_all_text`, `report`, `system_time`, `ocr`, `undo`, `shortcuts_list`, `shortcuts_run`, `pause_for_user`, `detect_webview`, `relaunch_with_cdp`, `build_uri`, `open_uri`, `open_app`, `open_file`, `open_url` |
- | `window` | `list`, `active`, `focus`, `maximize`, `minimize`, `restore`, `close`, `resize`, `list_displays`, `screen_size`, `open_app`, `open_file`, `open_url`, `switch_tab`, `navigate` |
- | `browser` | `navigate`, `connect`, `page_context`, `read_text`, `click`, `type`, `select_option`, `evaluate`, `wait_for`, `list_tabs`, `switch_tab`, `scroll` |
- | `computer` | `click`, `double_click`, `right_click`, `middle_click`, `triple_click`, `hover`, `move`, `move_relative`, `scroll`, `scroll_horizontal`, `drag`, `drag_path`, `mouse_down`, `mouse_up`, `type`, `key`, `key_press`, `key_down`, `key_up`, `wait`, `screenshot`, `screenshot_region`, `zoom` |
- | `batch` | `{steps:[…]}`: several calls in one round trip. Each step is `{name, arguments, expect?}` and is refused exactly as a direct call would be; the batch halts with a per-step trace on a refusal, an error or a failed `expect`. |
- ```js
- accessibility({ action: "invoke", name: "Send" }) // click by name
- computer({ action: "key", combo: "mod+s" }) // Cmd+S on macOS, Ctrl+S elsewhere
- window({ action: "open_app", name: "Outlook" })
- ```
- The full guide for agents is [SKILL.md](SKILL.md); it ships in the npm package and the Claude Code plugin. [clawdcursor.com/llms.txt](https://clawdcursor.com/llms.txt) is a shorter summary of it: install, the tool surface and the safety rules. Every parameter is in [schema.snapshot.json](schema.snapshot.json).
- ---
- ## Platform support
- | Platform | UI tree | OCR | Browser (CDP) | Input |
- |---|---|---|---|---|
- | **Windows** 10/11 (x64 / ARM64) | UI Automation via a PowerShell bridge | `Windows.Media.Ocr` | Chrome / Edge | nut-js |
- | **macOS** 12+ (Intel / Apple Silicon) | Native AX helper (Swift), JXA fallback | Apple Vision | Chrome / Edge | nut-js + System Events |
- | **Linux** X11 | AT-SPI via `python3-gi` | Tesseract | Chrome / Edge | nut-js |
- | **Linux** Wayland | AT-SPI via `python3-gi` | Tesseract | Chrome / Edge | `ydotool` / `wtype` |
- - **Windows:** no setup.
- - **macOS:** Accessibility is required; Screen Recording is needed only for screenshots and OCR. `clawdcursor grant` opens the dialogs. See [docs/MACOS-SETUP.md](docs/MACOS-SETUP.md). Retina scaling is handled for you: do not pre-scale coordinates.
- - **Linux X11:** `sudo apt install tesseract-ocr python3-gi gir1.2-atspi-2.0`.
- - **Linux Wayland:** the same, plus `ydotool` with `ydotoold` (preferred) or `wtype` (keyboard only).
- ---
- ## CLI
- For people setting up or diagnosing an install. Agents connect over MCP. Start here:
- ```
- clawdcursor doctor Check the install and set it up
- clawdcursor agent Run clawdcursor, with a live log of every action on this computer
- clawdcursor task "<task>" Test an agent: it does <task> with clawdcursor as its only tool, then PASS or FAIL
- ```
- In a terminal, `clawdcursor agent` prints one line per action, whichever clawdcursor did it: the one your Claude app or
- editor started, a `clawdcursor task` run, or the daemon itself. Each line has the time, who did it (`agent` or
- `mcp <pid>`), the tool and action, the outcome (`ok`, `refused`, `failed`, ...) with its result code, and how long
- it took. A server connecting or leaving, a pause waiting for you, and a stop or resume get a line too. Names and codes
- only: no typed text, clipboard or screen text. Ctrl+C ends it. Run as a service or piped, it prints nothing extra.
- Every command:
- ```
- clawdcursor consent Desktop-control consent (--accept / --revoke / --status)
- clawdcursor grant Request macOS permissions (macOS only)
- clawdcursor mcp stdio MCP server; your host starts this (--compact for the six tools)
- clawdcursor agent HTTP MCP server on 127.0.0.1:3847, with the live log in a terminal (--port, --compact, --no-vision)
- clawdcursor stop Stop every running instance; agents stay stopped until resume
- clawdcursor resume Continue the daemon's paused task or give control back after a stop (--end to end the task)
- clawdcursor doctor Diagnose the install (version, consent, screen capture, accessibility, permissions)
- clawdcursor status Readiness check (consent, permissions, whether the daemon is running)
- clawdcursor versions Every installed copy and its version
- clawdcursor update Update the global npm install, then list the other copies to update (from 2.1)
- clawdcursor telemetry Whether error reports are on, and every field sent (from 2.1)
- clawdcursor optout Turn error reports off; optin turns them back on (from 2.1)
- clawdcursor report Send a redacted report of the last session, after a preview (--save-only)
- clawdcursor register-skill Register the usage skill in detected agents again
- clawdcursor uninstall Remove all config, data and skill registrations
- clawdcursor task "<task>" Developer add-on: a test agent with clawdcursor as its only tool (see below)
- clawdcursor logs Developer add-on: the logs, readably (-f, --session, --tool, --errors, --since, --run)
- ```
- `--no-banner` (or `CLAWD_NO_BANNER=1`) on `mcp` and `agent` turns the on-screen pill and outline off.
- ### Testing clawdcursor on its own
- For developers who want to see what an agent does when clawdcursor is the **only** tool it has. Optional: two small
- add-ons, downloaded from npm the first time you use them and only after you say yes.
- ```
- clawdcursor task "Open a text editor and type hello" # the agent does it, then PASS or FAIL
- clawdcursor logs --run last # that run, joined with clawdcursor's own log
- clawdcursor doctor --setup # pick the default runner and model, run a test call
- ```
- - **Your subscription, no API key.** `task` runs your installed Claude Code (`claude -p`) or Codex (`codex exec`) on
- your own sign-in. The agent gets one MCP server, this clawdcursor (`mcp --compact`, or `--granular`), and none of its
- built-in tools, settings, plugins or skills. `--with claude|codex` picks one; by default it is the one `doctor --setup`
- chose, else the installed and signed-in CLI, Claude Code first. `--model` names a model.
- - **API keys are optional:** `--with anthropic` (`ANTHROPIC_API_KEY`, or a key stored by `doctor --setup`) and
- `--with openai-compatible` (base URL, key and model: OpenAI, Ollama, LM Studio, OpenRouter) run a small tool-calling
- loop over the same MCP server.
- - **What you see:** each tool call with its action and a one-line result, and the agent's short messages. The agent
- ends with a `PASS: …` or `FAIL: …` line, and the exit code follows it: 0 PASS, 1 FAIL or error, 130 Ctrl-C (the agent
- and its clawdcursor are stopped).
- - **What is kept:** every event of the run in `~/.clawdcursor/runs/<time>.jsonl` (screenshots left out), with the id of
- the clawdcursor session it drove. `logs` shows the day log's tool calls with their outcome, result code and where the
- time went, and stop, pause, refusals and server start and exit; `--session last`, `--tool click`, `--errors`,
- `--since 10m`, `-f` narrow or follow it.
- - **The add-ons:** `clawdcursor-agent` (`task` and `logs`) and `clawdcursor-doctor` (`doctor --setup`), installed with
- `npm install --prefix ~/.clawdcursor/addons` at clawdcursor's own version. With no terminal to ask in, the command is
- printed and nothing is downloaded; `--yes` installs without asking (CI). `doctor --setup` stores an API key in
- `~/.clawdcursor/agent.json`, readable only by you, or just the name of the variable that holds it.
- ---
- ## Development
- ```bash
- git clone https://github.com/AmrDab/clawdcursor.git && cd clawdcursor
- npm install
- npm run build # tsc + postbuild + bundle -> dist/surface/cli.js
- npm test # vitest
- npm run lint # eslint
- npm link # global `clawdcursor` shim
- npm run build:addons # the developer add-ons in packages/
- CLAWDCURSOR_ADDONS_DIR=$PWD/packages clawdcursor task "..." # use them from the repo: nothing is downloaded
- ```
- | Directory | What lives here |
- |---|---|
- | `src/core/` | Reading the screen (accessibility snapshots, the UI compiler), verification, and the Stop / pause / AI-assistant guards. |
- | `src/tools/` | The granular tools, the five compound tools and `batch`. |
- | `src/platform/` | The `PlatformAdapter` for Windows, macOS, Linux and Wayland; OCR; the CDP driver; the hard key list. |
- | `src/surface/` | CLI, MCP server (stdio and HTTP), dashboard, doctor, consent. |
- | `packages/` | The optional developer add-ons: `clawdcursor-agent` (`task`, `logs`) and `clawdcursor-doctor` (`doctor --setup`). |
- CI runs the tests on Node 20 and 22 on Ubuntu, macOS and Windows, with a coverage threshold, a performance smoke test and an `npm audit` gate.
- ## Contributing
- See [CONTRIBUTING.md](CONTRIBUTING.md). Bugs and feature requests go in [issues](https://github.com/AmrDab/clawdcursor/issues); security reports go through [SECURITY.md](SECURITY.md).
- ## License
- MIT. See [LICENSE](LICENSE).
- ## Acknowledgments
- Built on the Model Context Protocol SDK, nut-js, Playwright, sharp, and the AT-SPI, UI Automation and AX accessibility APIs.
- The pill's orb follows **Thinking Orbs** by Jakub Antalik ([libraries.dev](https://libraries.dev), [github.com/Jakubantalik/Libraries.dev](https://github.com/Jakubantalik/Libraries.dev)), MIT License, Copyright (c) 2026 Jakub Antalik. Its values (orbits, sizes, timings) are used in `scripts/banner.ps1` and `scripts/mac/overlay.swift`; the full MIT notice is at the top of `scripts/banner.ps1`.
- ---
- <p align="center">
- <a href="https://clawdcursor.com">clawdcursor.com</a> ·
- <a href="https://discord.gg/hW29nrEZ8G">Discord</a> ·
- <a href="CHANGELOG.md">Changelog</a> ·
- <a href="https://www.npmjs.com/package/clawdcursor">npm</a>
- </p>
docs/install.ps1 · Bundled script · 130 lines · 2 findings marked
- # Clawd Cursor Installer for Windows
- # Usage: powershell -c "irm https://clawdcursor.com/install.ps1 | iex"
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 2 on GitHub
- # Specify version: $env:VERSION='v2.1.0'; irm https://clawdcursor.com/install.ps1 | iex
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 3 on GitHub
- #
- # Installs the published npm package globally (npm i -g clawdcursor) -- no git
- # clone, no local build toolchain. Windows needs no native build step.
- $ErrorActionPreference = "Continue"
- # VERSION maps to an npm dist-tag/version. The old git-branch default ("main")
- # and a leading "v" both normalise to npm's "latest"/"x.y.z" form.
- $VERSION = if ($env:VERSION) { $env:VERSION } else { "latest" }
- if ($VERSION -in @("main", "latest", "")) {
- $PKG = "clawdcursor@latest"; $DISPLAY_VERSION = "latest"
- } else {
- $clean = $VERSION -replace '^v', ''
- $PKG = "clawdcursor@$clean"; $DISPLAY_VERSION = $clean
- }
- Write-Host ""
- Write-Host " /\___/\" -ForegroundColor Green
- Write-Host " ( >^.^< ) Clawd Cursor Installer" -ForegroundColor Green
- Write-Host " ) (" -ForegroundColor Green
- Write-Host " (_)_(_)_)" -ForegroundColor Green
- Write-Host ""
- # ── 1. Check Node.js ─────────────────────────────────────────────────────────
- $nodeVersion = $null
- try { $nodeVersion = (node --version 2>$null) } catch {}
- if (-not $nodeVersion) {
- Write-Host " [X] Node.js not found. Get it from https://nodejs.org (v20+)" -ForegroundColor Red
- exit 1
- }
- $major = [int]($nodeVersion -replace 'v(\d+)\..*', '$1')
- if ($major -lt 20) {
- Write-Host " [X] Node.js $nodeVersion is too old. Update to v20+: https://nodejs.org" -ForegroundColor Red
- exit 1
- }
- Write-Host " [OK] Node.js $nodeVersion" -ForegroundColor Green
- # ── 2. Install from npm (updates an existing global copy in place) ───────────
- # The version already installed, so we can say "updated X -> Y" afterwards.
- $before = $null
- try {
- $ls = npm ls -g clawdcursor --depth=0 --json 2>$null | Out-String | ConvertFrom-Json
- $before = $ls.dependencies.clawdcursor.version
- } catch {}
- # Windows refuses to replace files a running process has open (EBUSY): an
- # editor or Claude session that has clawdcursor running blocks the update.
- # Only processes running from the global copy hold its files open.
- $globalDir = $null
- try { $globalDir = (Join-Path (npm prefix -g 2>$null).Trim() 'node_modules\clawdcursor').ToLower() } catch {}
- $running = @(Get-CimInstance Win32_Process -Filter "Name='node.exe'" -ErrorAction SilentlyContinue |
- Where-Object { $globalDir -and $_.CommandLine -and $_.CommandLine.Replace('/', '\').ToLower().Contains($globalDir) })
- if ($before -and $running.Count -gt 0) {
- Write-Host " [!] clawdcursor is running in $($running.Count) session(s) (your editor or Claude app)." -ForegroundColor Yellow
- Write-Host " If the update fails with EBUSY, close those sessions or run 'clawdcursor stop', then re-run this" -ForegroundColor Yellow
- Write-Host " (after a stop, run 'clawdcursor resume' to let agents act again)." -ForegroundColor Yellow
- }
- Write-Host " Installing $PKG (global)..." -ForegroundColor Cyan
- $output = npm install -g $PKG --loglevel error 2>&1 | Out-String
- if ($LASTEXITCODE -ne 0) {
- Write-Host " [X] npm install failed:" -ForegroundColor Red
- foreach ($line in ($output -split "`r?`n" | Where-Object { $_ })) { Write-Host " $line" }
- if ($output -match 'EBUSY|EPERM') {
- Write-Host " A running clawdcursor has its files open. Close the editor / Claude sessions using it" -ForegroundColor Yellow
- Write-Host " (or run 'clawdcursor stop', and 'clawdcursor resume' afterwards), then re-run this command." -ForegroundColor Yellow
- } else {
- Write-Host " Retry in an elevated terminal, or set a user-writable npm prefix." -ForegroundColor Yellow
- }
- exit 1
- }
- # ── 3. Verify ─────────────────────────────────────────────────────────────────
- # Refresh PATH so we can find the newly installed command this session.
- $env:Path = [System.Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path", "User")
- $npmPrefix = (npm prefix -g 2>$null)
- if ($npmPrefix) { $npmPrefix = $npmPrefix.Trim() }
- $exe = Get-Command clawdcursor -ErrorAction SilentlyContinue
- Write-Host ""
- if ($exe) {
- $ver = (& clawdcursor --version 2>$null | Select-Object -Last 1)
- if (-not $before) {
- Write-Host " [OK] Clawd Cursor $ver installed!" -ForegroundColor Green
- } elseif ($before -eq $ver) {
- Write-Host " [OK] Clawd Cursor $ver is already the latest (reinstalled)." -ForegroundColor Green
- } else {
- Write-Host " [OK] Clawd Cursor updated: $before -> $ver" -ForegroundColor Green
- Write-Host " Restart any editor or Claude session that uses clawdcursor so it picks up $ver." -ForegroundColor Gray
- }
- # The installer only updates this global copy. The Claude Desktop extension
- # and the Claude Code plugin carry their own: list them so old ones show.
- Write-Host ""
- Write-Host " Copies of clawdcursor on this machine:" -ForegroundColor Cyan
- & clawdcursor versions 2>$null
- } elseif ($npmPrefix -and (-not ($env:Path -split ';' | Where-Object { $_ -eq $npmPrefix }))) {
- Write-Host " [OK] Installed, but npm's bin folder is not in your PATH." -ForegroundColor Yellow
- Write-Host " Add this to your PATH, then reopen your terminal:" -ForegroundColor Yellow
- Write-Host " $npmPrefix" -ForegroundColor White
- } else {
- Write-Host " [OK] Installed! Close and reopen your terminal to use 'clawdcursor'." -ForegroundColor Green
- }
- # ── 4. Next steps ──────────────────────────────────────────────────────────────
- # Detect prior consent (known path) so repeat installs don't re-prompt for it.
- $consentGiven = Test-Path "$HOME\.clawdcursor\consent"
- Write-Host ""
- if (-not $consentGiven) {
- Write-Host " Start here:" -ForegroundColor Cyan
- Write-Host " clawdcursor consent " -NoNewline -ForegroundColor Yellow
- Write-Host "One-time desktop-control authorization" -ForegroundColor Gray
- } else {
- Write-Host " [OK] Consent already accepted from a previous install." -ForegroundColor Green
- }
- Write-Host ""
- Write-Host " Then connect your agent (it brings the AI; clawdcursor is its tools):" -ForegroundColor Cyan
- Write-Host " - Claude Code: install the plugin (bundles the MCP server + skill," -ForegroundColor Gray
- Write-Host " no hand-edited config) -- see the README's plugin section." -ForegroundColor Gray
- Write-Host " - Claude Desktop: install the .mcpb extension from the GitHub release." -ForegroundColor Gray
- Write-Host " - Codex / Cursor / Windsurf / Zed: register " -NoNewline -ForegroundColor Gray
- Write-Host "clawdcursor mcp --compact" -ForegroundColor Yellow
- Write-Host " - A client that speaks MCP over HTTP: " -NoNewline -ForegroundColor Gray
- Write-Host "clawdcursor agent" -NoNewline -ForegroundColor Yellow
- Write-Host " (MCP on :3847, token auth)" -ForegroundColor Gray
- Write-Host " No API key in clawdcursor: your agent's host handles the model." -ForegroundColor Gray
- Write-Host ""
docs/install.sh · Bundled script · 109 lines · 2 findings marked
- #!/bin/bash
- # Clawd Cursor Installer for macOS / Linux
- # Usage: curl -fsSL https://clawdcursor.com/install.sh | bash
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 3 on GitHub
- # Specify version: VERSION=v2.1.0 curl -fsSL https://clawdcursor.com/install.sh | bash
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 4 on GitHub
- #
- # Installs the published npm package globally (npm i -g clawdcursor) — no git
- # clone, no local build toolchain. On macOS the package's postinstall builds
- # and ad-hoc-signs the native helper from source automatically (needs the Xcode
- # command-line tools; the install continues and tells you how to finish if not).
- set -e
- set -o pipefail
- # VERSION maps to an npm dist-tag/version. The old git-branch default ("main")
- # and a leading "v" both normalise to npm's "latest"/"x.y.z" form.
- VERSION="${VERSION:-latest}"
- case "$VERSION" in
- main|latest|"") PKG="clawdcursor@latest"; DISPLAY_VERSION="latest" ;;
- *) PKG="clawdcursor@${VERSION#v}"; DISPLAY_VERSION="${VERSION#v}" ;;
- esac
- echo ""
- echo " /\___/\\"
- echo " ( >^.^< ) Clawd Cursor Installer"
- echo " ) ("
- echo " (_)_(_)_)"
- echo ""
- # ── 1. Check Node.js ─────────────────────────────────────────────────────────
- if ! command -v node &>/dev/null; then
- echo " ❌ Node.js not found. Install v20+ from https://nodejs.org"
- exit 1
- fi
- NODE_MAJOR=$(node -e "console.log(process.versions.node.split('.')[0])")
- if [ "$NODE_MAJOR" -lt 20 ]; then
- echo " ❌ Node.js $(node --version) is too old. Update to v20+: https://nodejs.org"
- exit 1
- fi
- echo " ✅ Node.js $(node --version)"
- # ── 2. Install from npm (updates an existing global copy in place) ───────────
- # The version already installed, so we can say "updated X -> Y" afterwards.
- BEFORE="$(npm ls -g clawdcursor --depth=0 --json 2>/dev/null | node -e 'let s="";process.stdin.on("data",d=>s+=d).on("end",()=>{try{process.stdout.write(JSON.parse(s).dependencies.clawdcursor.version||"")}catch{}})' 2>/dev/null || true)"
- echo " 📦 Installing $PKG (global)..."
- if ! npm install -g "$PKG" --loglevel error; then
- echo ""
- echo " ❌ npm install failed."
- echo " If it was a permissions (EACCES) error, either:"
- echo " • set a user-writable npm prefix: npm config set prefix ~/.npm-global"
- echo " then add ~/.npm-global/bin to your PATH and re-run, or"
- echo " • re-run with elevated privileges: sudo npm install -g $PKG"
- exit 1
- fi
- # ── 3. macOS native helper note ──────────────────────────────────────────────
- # The npm postinstall already built + ad-hoc-signed the helper. TCC permissions
- # still need a human click; `clawdcursor grant` walks you through them.
- if [ "$(uname)" = "Darwin" ]; then
- echo " 🍎 macOS: grant Accessibility + Screen Recording when prompted —"
- echo " run: clawdcursor grant"
- fi
- # ── 4. Verify ─────────────────────────────────────────────────────────────────
- echo ""
- if command -v clawdcursor &>/dev/null; then
- NOW="$(clawdcursor --version 2>/dev/null | tail -n 1)"
- NOW="${NOW:-$DISPLAY_VERSION}"
- if [ -z "$BEFORE" ]; then
- echo " ✅ Clawd Cursor $NOW installed!"
- elif [ "$BEFORE" = "$NOW" ]; then
- echo " ✅ Clawd Cursor $NOW is already the latest (reinstalled)."
- else
- echo " ✅ Clawd Cursor updated: $BEFORE → $NOW"
- echo " Restart any editor or Claude session that uses clawdcursor so it picks up $NOW."
- fi
- # The installer only updates this global copy. The Claude Desktop extension
- # and the Claude Code plugin carry their own: list them so old ones show.
- echo ""
- echo " Copies of clawdcursor on this machine:"
- clawdcursor versions 2>/dev/null || true
- else
- NPM_PREFIX="$(npm prefix -g 2>/dev/null)/bin"
- echo " ✅ Installed, but npm's global bin folder isn't on your PATH."
- echo " Add this to your shell profile (~/.bashrc or ~/.zshrc):"
- echo " export PATH=\"$NPM_PREFIX:\$PATH\""
- echo " then reopen your terminal."
- fi
- # ── 5. Next steps ──────────────────────────────────────────────────────────────
- # Detect prior consent (known path) so repeat installs don't re-prompt for it.
- CONSENT_FILE="$HOME/.clawdcursor/consent"
- echo ""
- if [ ! -f "$CONSENT_FILE" ]; then
- echo " Start here:"
- echo " clawdcursor consent One-time desktop-control authorization"
- else
- echo " [OK] Consent already accepted from a previous install."
- fi
- echo ""
- echo " Then connect your agent (it brings the AI; clawdcursor is its tools):"
- echo " • Claude Code: install the plugin (bundles the MCP server + skill,"
- echo " no hand-edited config) — see the README's plugin section."
- echo " • Claude Desktop: install the .mcpb extension from the GitHub release."
- echo " • Codex / Cursor / Windsurf / Zed: register \`clawdcursor mcp --compact\`."
- echo " • A client that speaks MCP over HTTP: \`clawdcursor agent\` (MCP on :3847, token auth)."
- echo " No API key in clawdcursor: your agent's host handles the model."
- echo ""
src/surface/uninstall.ts · Bundled script · 158 lines · 2 findings marked
- /**
- * `clawdcursor uninstall`: stop the daemon, then remove clawdcursor's config, data, skill registrations, MCP entries and
- * build output.
- */
- import * as fs from 'fs';
- import * as path from 'path';
- import * as os from 'os';
- import * as readline from 'readline';
- import { execSync } from 'child_process';
- import { e } from './format';
- import { getPackageRoot } from '../paths';
- import { privateRunDir } from '../platform/ps-spawn';
- import { authHeaders, readToken } from './auth';
- import { daemonPortForClient, sweepAllLocks } from './pidfile';
- import { ourSkillRegistrations } from './skill-register';
- /**
- * Stop the daemon on the port it recorded (before the data dir and its token go), then every clawdcursor a lock proves.
- */
- export async function stopRunningDaemon(): Promise<void> {
- try {
- if (readToken()) {
- const resp = await fetch(`http://127.0.0.1:${daemonPortForClient()}/stop`, { method: 'POST', headers: authHeaders() });
- if (resp.ok) {
- console.log(` ${e('🛑', '[STOP]')} Stopped running server`);
- await new Promise(r => setTimeout(r, 1000)); // give it a moment to shut down
- }
- }
- } catch { /* server not running — that's fine */ }
- // Only a holder its lock proves is clawdcursor is signalled; a stale lock is just deleted (sweepAllLocks).
- for (const r of await sweepAllLocks()) {
- if (r.outcome === 'stopped') console.log(` ${e('🛑', '[STOP]')} Killed running ${r.mode} process (pid ${r.pid})`);
- }
- }
- export async function runUninstall(): Promise<void> {
- if (!process.stdin.isTTY || !process.stdout.isTTY) {
- console.error(`\n${e('❌', '[ERR]')} clawdcursor uninstall requires an interactive terminal.\n`);
- process.exit(1);
- }
- const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
- const answer = await new Promise<string>((resolve) => {
- rl.question(`\n${e('⚠️', '[WARN]')} This will remove all Clawd Cursor config and data. Continue? (y/N) `, resolve);
- });
- rl.close();
- if (answer.toLowerCase() !== 'y') {
- console.log('Cancelled.');
- return;
- }
- console.log(`\n${e('🗑️', '[DEL]')} Uninstalling Clawd Cursor...\n`);
- const clawdRoot = getPackageRoot();
- const homeDir = os.homedir();
- let removed = 0;
- const failed: string[] = [];
- // Resilient remove: never let one locked / permission-denied path abort the
- // whole uninstall. On Windows a file handle (a running daemon, the logger's
- // current log file, AV/indexer) can briefly hold a path open → EPERM/EBUSY.
- // rmSync's maxRetries rides out the transient lock; the try/catch downgrades
- // a hard failure to a warning + manual-cleanup hint and CONTINUES to the next
- // step.
- const safeRemove = (target: string, label: string): void => {
- try {
- if (!fs.existsSync(target)) return;
- const stat = fs.lstatSync(target);
- if (stat.isSymbolicLink() || stat.isFile()) fs.unlinkSync(target);
- else fs.rmSync(target, { recursive: true, force: true, maxRetries: 5, retryDelay: 200 });
- console.log(` ${e('🗑️', '[DEL]')} Removed ${label}`);
- removed++;
- } catch (err) {
- const code = (err as NodeJS.ErrnoException).code || (err as Error).message;
- failed.push(`${target} (${code})`);
- console.log(` ${e('⚠️', '[WARN]')} Could not remove ${label} (${code}) — close any running clawdcursor, then delete manually: ${target}`);
- }
- };
- await stopRunningDaemon();
- const configFiles = [
- path.join(clawdRoot, '.clawdcursor-config.json'),
- path.join(clawdRoot, '.clawdcursor-favorites.json'), // written by installs before 1.6
- path.join(clawdRoot, '.env'),
- ];
- for (const f of configFiles) safeRemove(f, path.basename(f));
- safeRemove(path.join(homeDir, '.clawdcursor'), path.join(homeDir, '.clawdcursor'));
- safeRemove(path.join(homeDir, '.clawd-cursor'), `legacy ${path.join(homeDir, '.clawd-cursor')}`);
- safeRemove(path.join(clawdRoot, 'debug'), 'debug/');
- for (const sp of ourSkillRegistrations(homeDir)) safeRemove(sp, `skill registration: ${sp}`);
- const mcpConfigs = [
- path.join(homeDir, '.claude', 'settings.json'),
- path.join(homeDir, '.claude', 'settings.local.json'),
- path.join(homeDir, '.cursor', 'mcp.json'),
- path.join(homeDir, '.windsurf', 'mcp.json'),
- path.join(homeDir, '.codeium', 'windsurf', 'mcp_config.json'),
- path.join(homeDir, '.vscode', 'mcp.json'),
- ];
- for (const configPath of mcpConfigs) {
- try {
- if (!fs.existsSync(configPath)) continue;
- const raw = fs.readFileSync(configPath, 'utf-8');
- const json = JSON.parse(raw);
- const servers = json.mcpServers || json.servers || {};
- let found = false;
- for (const key of Object.keys(servers)) {
- if (key.toLowerCase().includes('clawdcursor') || key.toLowerCase().includes('clawd-cursor')) {
- delete servers[key];
- found = true;
- }
- }
- if (found) {
- fs.writeFileSync(configPath, JSON.stringify(json, null, 2) + '\n');
- console.log(` ${e('🗑️', '[DEL]')} Removed MCP entry from ${configPath}`);
- removed++;
- }
- } catch { /* skip unreadable configs */ }
- }
- safeRemove(path.join(clawdRoot, 'dist'), 'dist/');
- // macOS native helper build output — regenerable, not tracked (#155).
- safeRemove(path.join(clawdRoot, 'native', '.build'), 'native/.build/');
- safeRemove(path.join(clawdRoot, 'native', 'ClawdCursor.app'), 'native/ClawdCursor.app/');
- try {
- // Left on PATH on purpose: the user runs this uninstall themselves, and npm is theirs to resolve (not a system program).
- execSync('npm unlink -g clawdcursor', { stdio: 'pipe', timeout: 15000, cwd: privateRunDir() });
- console.log(` ${e('🗑️', '[DEL]')} Removed global clawdcursor command`);
- removed++;
- } catch { /* may not be linked globally */ }
- if (removed === 0 && failed.length === 0) {
- console.log(' Nothing to clean up.');
- }
- if (failed.length > 0) {
- console.log(`\n${e('⚠️', '[WARN]')} ${failed.length} item(s) could not be removed (a running process likely held a file open). Close any clawdcursor process, then delete these manually:`);
- for (const f of failed) console.log(` ${f}`);
- }
- console.log(`\n${e('🐾', '>')} ${failed.length > 0 ? 'Uninstall finished with warnings' : 'Fully uninstalled'}. To remove the source code, delete:`);
- console.log(` ${clawdRoot}`);
- // Closing the reinstall dead-end: this command just removed the global
- // `clawdcursor` shim, so no `clawdcursor` command works afterwards — and
- // the natural next step shouldn't be a guess. Point the user at the package
- // manager (works everywhere) plus the turnkey one-liner for their OS.
- const reinstallOneLiner = process.platform === 'win32'
- ? 'irm https://clawdcursor.com/install.ps1 | iex'
- Note: Runs a downloaded PowerShell script (iex / Invoke-Expression)
- Line 154 on GitHub
- : 'curl -fsSL https://clawdcursor.com/install.sh | bash';
- Note: Pipes a downloaded script directly into a shell (curl | sh / wget | bash)
- Line 155 on GitHub
- console.log(`\n${e('📦', '>')} To reinstall: npm i -g clawdcursor`);
- console.log(` or: ${reinstallOneLiner}\n`);
- }
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.