Open source · v0.1.0 · MIT

Give AI agents
hands.

Open-source CLI packages that let AI agents interact with real apps — click buttons, fill forms, take screenshots, assert state. No MCPs. No servers. No setup. Just npm install.

agent task
# Your agent installs the tool
$ npm i -D @harnessgg/electron


# Then runs it like any CLI
$ harness-electron connect --port 9222
{"ok":true,"session":"ses_a1b2","data":{"target":"My Electron App"}}


$ harness-electron click --role button --name "Sign in"
{"ok":true,"session":"ses_a1b2","data":{"selector":"[role=button]"}}


$ harness-electron assert --kind url --expected "/dashboard"
{"ok":true,"session":"ses_a1b2","data":{"actual":"/dashboard"}}

MCPs require setup

Model Context Protocol servers need a running daemon, config files, and IDE integration. An autonomous agent can't set that up mid-task.

Agents are stuck reading

AI agents can read and write code beautifully. But they can't click a button, verify a UI state, or debug a running app without help.

Harness: just a CLI

Any agent that can run a shell command can use Harness. Install once via npm, then call it like any other tool. Output is always machine-readable JSON.

1
Agent discovers the package

Via llms.txt, npm search, or documentation — agents find what's available.

2
Installs with one command

npm i -D @harnessgg/electron — no daemons, no config, no restart.

3
Runs CLI commands

Every command returns structured JSON. Agents parse it, react, and continue.

@harnessgg/electron

v0.1.0 published

Interact with any Electron app through the Chrome DevTools Protocol. Click, type, screenshot, assert — all from the CLI with structured JSON output.

npm i -D @harnessgg/electron
Commands
connectdomclicktypescreenshotassertevaluatewait
# Connect to an Electron app (--inspect-brk or remote-debugging-port)
$ harness-electron connect --port 9222


# Inspect the DOM
$ harness-electron dom --format summary


# Interact
$ harness-electron type --css "input[name=email]" --value "user@example.com"
$ harness-electron click --role button --name "Sign in"


# Assert and capture
$ harness-electron assert --kind url --expected "/dashboard"
$ harness-electron screenshot --path ./artifacts/post-login.png


# All output is JSON — pipe it, parse it, react to it
$ harness-electron dom --format summary | jq '.data.elements'
electroncdpplaywrightdebugging

Coming soon

@harnessgg/browser

Harness any Chromium or Firefox browser tab.

@harnessgg/desktop

Control native desktop apps on macOS, Windows, and Linux.

@harnessgg/terminal

Interact with terminal emulators and shell sessions.

Harness is designed so agents can discover and use it autonomously — no human needs to set anything up.

📄

/llms.txt

Machine-readable index of all available packages, commands, and installation instructions. Parseable without a browser.

📦

/packages.json

Structured JSON registry of every Harness package. Includes install commands, command specs, response schemas, and version info.

🔧

JSON-first output

Every CLI command returns a single JSON object to stdout. No parsing. No scraping. Designed for agents, not humans.

Zero config

Install the package, run the binary. No daemons to start, no config files to write, no ports to open (beyond your app's CDP port).

how an agent finds harness
# Option 1: Fetch the discovery index
$ curl https://harness.gg/llms.txt


# Option 2: Fetch the package registry
$ curl https://harness.gg/packages.json


# Option 3: npm search
$ npm search @harnessgg


# Then install whatever you need
$ npm i -D @harnessgg/electron
$ harness-electron --help