usecomputer
https://github.com/remorses/usecomputer
📊 Stats
⭐ Stars: 140
📝 Language: Zig
📝 Description: Fast computer automation CLI for AI agents. Control any desktop with accessibility snapshots, clicks, typing, scrolling,
⭐ Star Growth (12 months)
🔬 Research Notes
Stats
Description
Fast computer automation CLI for AI agents. Control any desktop with accessibility snapshots, clicks, typing, scrolling, and more.
Topics
None
Research Summary
Key Features
Architecture
Use Cases
Assessment
README Excerpt
```
# usecomputer
usecomputer is a desktop automation CLI for AI agents. It works on macOS and
Linux (X11).
Screenshot, mouse control (move, click, drag, scroll), and keyboard synthesis
(type and press) are all available as CLI commands backed by a native Zig
binary — no Node.js runtime required.
Install
```bash
npm install -g usecomputer
```
Requirements
DISPLAY set (Wayland via XWayland works too)Quick start
```bash
usecomputer mouse position --json
usecomputer mouse move -x 500 -y 500
usecomputer click -x 500 -y 500 --button left --count 1
usecomputer type "hello"
usecomputer press "cmd+s"
```
Library usage
```ts
import * as usecomputer from 'usecomputer'
const screenshot = await usecomputer.screenshot({
path: './tmp/shot.png',
display: null,
window: null,
region: null,
annotate: null,
})
const coordMap = usecomputer.parseCoordMapOrThrow(screenshot.coordMap)
const point = usecomputer.mapPointFromCoordMap({
point: { x: 400, y: 220 },
coordMap,
})
await usecomputer.click({
point,
button: 'left',
count: 1,
})
```
These exported functions intentionally mirror the native command shapes used by
the Zig N-API module. Optional native fields are passed as null when absent.
OpenAI computer tool example
```ts
import fs from 'node:fs'
import * as usecomputer from 'usecomputer'
async function sendComputerScreenshot() {
const screenshot = await usecomputer.screenshot({
path: './tmp/computer-tool.png',
display: null,
window: null,
region: null,
annotate: null,
})
return {
screenshot,
imageBase64: await fs.promises.readFile(screenshot.path, 'base64'),
}
}
async function runComputerAction(action, coordMap) {
if (action.type === 'click') {
await usecomputer.click({
point: usecomputer.mapPointFromCoordMap({
point: { x: action.x, y: action.y },
coordMap: usecomputer.parseCoordMapOrThrow(coordMap),
}),
button: action.button ?? 'left',
count: 1,
})
return
}
if (action.type === 'double_click') {
await usecomputer.click({
point: usecomputer.mapPointFromCoordMap({
point: { x: action.x, y: action.y },
coordMap: usecomputer.parseCoordMapOrThrow(coordMap),
```
---
*Researched: 2026-03-26*