Skip to main content

use-computer

Executes input on a screen for computer-use agents: move, click, double-click, right-click, drag, scroll, type text, press key combinations, and capture a screenshot.

use-computer is the acting half of a pair. ui-locator answers where the Invia button is and returns pixel coordinates; use-computer performs the click there. Both are driven by another AI agent through a CLI that emits JSON on stdout and diagnostics on stderr, with a Python API underneath.

Install

pip install use-computer-cli            # no backend
pip install "use-computer-cli[local]"   # drive this machine's display (pynput + mss)
pip install "use-computer-cli[vnc]"     # drive a remote framebuffer over RFB (vncdotool)

Backends are optional extras, imported lazily, so the package installs without them.

The distribution is use-computer-cli because use-computer is taken on PyPI by an unrelated project. The command it installs is use-computer, and the package it imports is use_computer.

Use

use-computer click --x 120 --y 340 --use staging
use-computer type --text "hello" --use staging
use-computer key ctrl+s --use staging
use-computer screenshot --use laptop --out shot.png

# a batch runs over one connection -- the default command, so `batch` may be omitted
echo '[{"action":"click","x":120,"y":340},{"action":"key","combo":"enter"}]' \
  | use-computer - --use staging --verify

stdout is one JSON object per run; every diagnostic goes to stderr. Exit codes: 0 success, 1 failure, 2 bad usage.

Three problems it solves

  • Coordinate spaces. A screenshot on a HiDPI display is larger than the space the OS clicks in. Every coordinate carries its space, use-computer scales between them, and it refuses to guess when the ratio is unknown.
  • Setup cost. Opening a VNC connection dominates a single action, so one run performs a batch of actions over one connection.
  • Blind actuation. A click that lands on nothing looks exactly like a click that worked, so --verify compares the screen before and after and reports whether it changed.

Configure

use-computer config init                                  # asks, then proves it works
use-computer config init --backend vnc --host 10.0.0.5    # doesn't ask
use-computer config init --backend local --allow-local

config init writes the file below, then opens the backend it just configured and reports the screen geometry and scale — so a coordinate space whose ratio cannot be derived surfaces at setup rather than at the first click that lands in the wrong place.

It writes .use-computer/config.toml at the project root (found by walking up, the way git finds its own):

default-profile = "laptop"
delay = 0.1

[profiles.laptop]
backend = "local"
allow-local = true

[profiles.staging]
backend = "vnc"
host = "10.0.0.5"
port = 5900

Secrets go in .use-computer/.env, which is not committed. use-computer config show prints every resolved value, the layer it came from and the variable that would override it.

The agent skill

Instructions for the calling agent ship inside the package and are installed from it, so they always match the installed version:

use-computer skill install --scope project

Documentation

This package is developed with SDD. The specs it implements live in product/ and system/ at the repository root.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

use_computer_cli-0.1.0.tar.gz (45.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

use_computer_cli-0.1.0-py3-none-any.whl (41.6 kB view details)

Uploaded Python 3

File details

Details for the file use_computer_cli-0.1.0.tar.gz.

File metadata

  • Download URL: use_computer_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 45.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.6.4

File hashes

Hashes for use_computer_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fdf46deca5c6025e514ba4b741de9717a31928a8354ab769d3e1e45b0bd78d63
MD5 256ec0541849ea2966637268638db6d6
BLAKE2b-256 498b29bc5a793295335158cd1bfd594a9b55353db8dede5c3cbad1a72b7f42c7

See more details on using hashes here.

File details

Details for the file use_computer_cli-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for use_computer_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b50aa6a85db39453af0bf3faf4856dc10b34e3c17f65258d48eba133c377bfde
MD5 11ca410e059fdb185183de7d5c434e0c
BLAKE2b-256 7d8950ed86db44105f6694bba946f044115ead624e3174bd6409b5f251c8ec22

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page