
Security News
pnpm 11.5 Adds Support for Recognizing npm Staged Publishes
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.
@injaneity/pi-computer-use
Advanced tools
Codex-style computer use for Pi on macOS.
pi-computer-use gives Pi agents a semantic computer-use surface for visible macOS windows. It prefers Accessibility (AX) targets such as @e1, returns semantic state after every action, and attaches screenshots only when AX coverage is too weak for reliable operation.
Install the Pi package:
pi install git:github.com/injaneity/pi-computer-use@v0.2.5
Start Pi in interactive mode. On the first session, grant macOS permissions to:
~/.pi/agent/helpers/pi-computer-use/bridge
Required permissions:
Some browser automation paths use JavaScript from Apple Events. If the browser blocks that, Pi surfaces a model-readable hint asking the user to enable Allow JavaScript from Apple Events in the browser's developer menu, then retry.
Then call screenshot first in a Pi session. It selects the controlled window and returns the latest semantic state, including AX refs such as @e1 when available. If the target app/window is ambiguous, use list_apps and list_windows first.
list_apps()
list_windows({ app: "Safari" })
screenshot({ window: "@w1" })
click({ window: "@w1", ref: "@e1" })
set_text({ ref: "@e2", text: "hello" })
Use /computer-use in Pi to inspect the effective config and config sources.
list_apps, list_windows, screenshot, click, double_click, move_mouse, drag, scroll, keypress, type_text, set_text, wait, arrange_window, navigate_browser, computer_actions.canSetValue, canPress, canFocus, canScroll, and adjust.list_windows, with explicit targeting such as screenshot({ window: "@w1" }) and click({ window: "@w1", ref: "@eN" }).arrange_window presets or explicit frames.image: "auto" | "always" | "never".click({ ref: "@eN" }), scroll({ ref: "@eN" }), and set_text({ ref: "@eN", text }).computer_actions, with one post-action semantic state update plus per-action execution metadata.stealth for background-safe AX paths and default for focus/raw-event fallbacks.benchmarks/.Prefer AX refs over coordinates when a matching target exists:
click({ ref: "@e1" })
scroll({ ref: "@e3", scrollY: 600 })
Use coordinates from the latest screenshot only when there is no suitable AX target:
click({ x: 320, y: 180, stateId: "..." })
Replace text through AX value semantics:
set_text({ ref: "@e2", text: "https://example.com" })
keypress({ keys: ["Enter"] })
Batch obvious actions when no intermediate inspection is needed:
computer_actions({
stateId: "...",
actions: [
{ type: "click", ref: "@e1" },
{ type: "set_text", ref: "@e2", text: "https://example.com" },
{ type: "keypress", keys: ["Enter"] }
]
})
See docs/usage.md for the full workflow and tool patterns.
pi-computer-use has three pieces:
extensions/computer-use.ts registers the public tools and /computer-use command.src/bridge.ts manages the current window, capture IDs, AX refs, fallback policy, batching, and execution metadata.native/macos/bridge.swift talks to macOS Accessibility, AppKit, and CoreGraphics. On macOS 14+, the modern helper also uses ScreenCaptureKit for window capture.The result is semantic-first GUI control: Pi sees useful AX targets first, falls back to screenshots only when needed, and reports whether each action stayed background-safe.
Install dependencies:
npm install
Run checks:
npm test
Run the local checkout in Pi without loading another installed copy:
pi --no-extensions -e .
Run the default QA benchmark:
npm run benchmark:qa
Run the wider benchmark that may open apps:
npm run benchmark:qa:full
The package is published on npm as @injaneity/pi-computer-use.
npm install @injaneity/pi-computer-use
npm install @injaneity/pi-computer-use@0.2.5
Pi installs should pin a GitHub release tag:
pi install git:github.com/injaneity/pi-computer-use@v0.2.5
pi install -l git:github.com/injaneity/pi-computer-use@v0.2.5
pi install /absolute/path/to/pi-computer-use
Remove:
pi remove git:github.com/injaneity/pi-computer-use@v0.2.5
npm remove @injaneity/pi-computer-use
For a different release, replace v0.2.5 or 0.2.5 with the version you want to pin.

MIT
FAQs
Codex-style computer-use tools for Pi on macOS.
The npm package @injaneity/pi-computer-use receives a total of 91 weekly downloads. As such, @injaneity/pi-computer-use popularity was classified as not popular.
We found that @injaneity/pi-computer-use demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
pnpm 11.5 now recognizes npm staged publish approvals in release metadata, preventing those releases from being mistaken for lower-trust package publishes.

Security News
Federal audit finds NIST lacked a plan to clear the NVD backlog, wasted funds on duplicate work, and delayed use of CISA data.

Research
/Security News
A mini Shai-Hulud campaign compromised Red Hat Cloud Services npm packages to steal developer and CI/CD secrets during installation.