Skip to main content

Computer-Use Interface (CUI) framework powering Cua

Project description

Shows my svg

Python macOS Discord PyPI

cua-computer is a Computer-Use Interface (CUI) framework powering Cua for interacting with local macOS and Linux sandboxes, PyAutoGUI-compatible, and pluggable with any AI agent systems (Cua, Langchain, CrewAI, AutoGen). Computer relies on Lume for creating and managing sandbox environments.

Get started with Computer

from computer import Computer

computer = Computer(os_type="macos", display="1024x768", memory="8GB", cpu="4")
try:
    await computer.run()
    
    screenshot = await computer.interface.screenshot()
    with open("screenshot.png", "wb") as f:
        f.write(screenshot)
    
    await computer.interface.move_cursor(100, 100)
    await computer.interface.left_click()
    await computer.interface.right_click(300, 300)
    await computer.interface.double_click(400, 400)

    await computer.interface.type("Hello, World!")
    await computer.interface.press_key("enter")

    await computer.interface.set_clipboard("Test clipboard")
    content = await computer.interface.copy_to_clipboard()
    print(f"Clipboard content: {content}")
finally:
    await computer.stop()

Install

To install the Computer-Use Interface (CUI):

pip install "cua-computer[all]"

The cua-computer PyPi package pulls automatically the latest executable version of Lume through pylume.

Run

Refer to this notebook for a step-by-step guide on how to use the Computer-Use Interface (CUI):

Docs

Project details


Download files

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

Source Distribution

cua_computer-0.4.8.tar.gz (75.2 kB view details)

Uploaded Source

Built Distribution

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

cua_computer-0.4.8-py3-none-any.whl (89.0 kB view details)

Uploaded Python 3

File details

Details for the file cua_computer-0.4.8.tar.gz.

File metadata

  • Download URL: cua_computer-0.4.8.tar.gz
  • Upload date:
  • Size: 75.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for cua_computer-0.4.8.tar.gz
Algorithm Hash digest
SHA256 e10cb3d6b5c985913d88af30685c9f7c045a38f9c252ca51d08969a148b5aaa0
MD5 4fb6c1a7f235ff0b863f3282358a8e82
BLAKE2b-256 de674ed7ac86d1d0169b0b62a474a8e00b68aeaf49e3f778f98f15162a4c4bc0

See more details on using hashes here.

File details

Details for the file cua_computer-0.4.8-py3-none-any.whl.

File metadata

  • Download URL: cua_computer-0.4.8-py3-none-any.whl
  • Upload date:
  • Size: 89.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for cua_computer-0.4.8-py3-none-any.whl
Algorithm Hash digest
SHA256 e6d3fac35a9691db2197c1b478a2e9fb2084cc9c07b4a95de2fb405b57a8a8a0
MD5 be7396c6641a1b97c5b2794c5ea473e6
BLAKE2b-256 215c1d20fa4a7f0dfb694120c095cae4667458249538919c3798019b4f5c77bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page