open-computer-use README

项目的 README,来自 github.com/iFurySt/open-computer-use。合并为一个 markdown 文件:README.md。

open-computer-use

English 简体中文 Release Ask DeepWiki LLMAPIS

[!TIP] Interested in Browser Use? Check out open-browser-use.


open-computer-use is an open-source Computer Use service wrapped as MCP. Any AI agent or MCP client can use it to run Computer Use on macOS, Linux, and Windows.

This project was inspired by OpenAI's Codex Computer Use. It showed that non-intrusive CUA can be built on top of Accessibility, so I decided to build an open-source version.

I started this repo with my harness template, a template for quickly spinning up AI-first projects. It has been one of our most useful workflows lately, especially for nearly 100% AI-generated projects. I also wrote a post about the methodology behind it.

Demos

Codex App and Codex CLI

Open Computer Use custom demo cover

open-computer-use used as Computer Use in Codex App and Codex CLI, matching the official experience.

Gemini CLI

https://github.com/user-attachments/assets/eacb3b15-f939-46c7-b3b3-6f876977a58d

Gemini CLI connects to open-computer-use through MCP and runs full Computer Use actions.

Linux

https://github.com/user-attachments/assets/e036b1c8-2200-4896-abd4-19225915cf66

open-computer-use running on Linux.

Locked Use

Locked Use is now supported on macOS. OCU temporarily unlocks your Mac after it has been locked so the agent can continue working, with protective services such as a full-screen shield in place during use.

Open Computer Use Locked Use screen

See the Locked Use guide for setup, installed components, and permissions

Quick Start

npm i -g open-computer-use

The npm package also exposes ocu as the short CLI alias.

[!IMPORTANT] The macOS runtime requires macOS 14.0 or later.

On macOS, run it once and grant Accessibility and Screen Recording. Windows and Linux do not need this step.

open-computer-use
# or
ocu

Before using it, install it into your agent:

# Install into Codex by writing to ~/.codex/config.toml
open-computer-use install-codex-mcp
ocu install-codex-mcp

Or add it to your own client manually:

{
  "mcpServers": {
    "open-computer-use": {
      "command": "open-computer-use",
      "args": ["mcp"]
    }
  }
}

Skill

Install the skill directly:

# Install for Codex
npx skills add iFurySt/open-computer-use -g -a codex --skill open-computer-use -y
npx skills ls -g -a codex | rg 'open-computer-use'

Install for Claude Code:

npx skills add iFurySt/open-computer-use -g -a claude-code --skill open-computer-use -y

Update an existing global install, including the Codex install created above:

npx skills update open-computer-use -g -y

You can also manually download and install the open-computer-use skill.

More

Besides the MCP JSON config above, you can also use the built-in commands:

# Install into Codex by writing to ~/.codex/config.toml
open-computer-use install-codex-mcp

# Install as a Codex plugin, mainly for Codex App
open-computer-use install-codex-plugin

# Install into Claude Code by writing to ~/.claude.json
open-computer-use install-claude-mcp

# Install into Gemini CLI for the current project by writing to ./.gemini/settings.json
open-computer-use install-gemini-mcp

# Install into Gemini CLI user config instead
open-computer-use install-gemini-mcp --scope user

# Install into opencode by writing to ~/.config/opencode/opencode.json (or the active config file)
open-computer-use install-opencode-mcp

# Call a single Computer Use tool and print the MCP-style JSON result
open-computer-use call list_apps
ocu call list_apps
open-computer-use call get_app_state --args '{"app":"TextEdit"}'

# Run a sequence in one process so element_index state can be reused
# Sequence runs sleep 1s between successful operations by default
open-computer-use call --calls '[{"tool":"get_app_state","args":{"app":"TextEdit"}},{"tool":"press_key","args":{"app":"TextEdit","key":"Return"}}]'
open-computer-use call --calls-file examples/textedit-overlay-seq.json --sleep 0.5

# Check permissions; onboarding only opens when something is missing
open-computer-use doctor

# macOS: query permission JSON without opening onboarding
ocu doctor --json

# Show help
open-computer-use -h
ocu -h

Global Configuration

ocu supports global configuration starting with version 1.0.0 to accommodate different workflows and use cases. The default configuration file is ~/.config/ocu/config.json. You can edit the file directly or use the ocu config subcommands. See the configuration guide for details.

Star History

Star History Chart for open-computer-use

License

MIT

open-computer-use (iFurySt/open-computer-use)

正在搜索数据库…

这是什么?open-computer-use 是一个开源的 Computer Use 服务,以 MCP 服务器的形式提供,让任何 AI 智能体或 MCP 客户端都能控制 macOS、Linux 和 Windows 上电脑的图形界面(GUI)。
这是独立应用,还是需要接入我的智能体?它是一个 npm 命令行工具和 MCP 服务器(别名为 'ocu'),需要安装到现有的 AI 智能体或 MCP 客户端中使用,不是可以单独运行的独立应用。
怎样才能让它跑起来?通过 npm 包把它安装到你的智能体中,手动把 MCP JSON 配置添加到你自己的客户端,或直接安装 Claude Code 技能。
运行之前需要准备什么?需要 Node.js 18 或更高版本来运行 npm 启动器;在 macOS 上还必须先运行一次,并授予“辅助功能”和“屏幕录制”权限(Windows 和 Linux 不需要这一步)。
设置时有什么需要注意的坑吗?在 macOS 上,一个隐藏的权限代理应用可能会常驻后台,以保持相同的权限身份;另外,通过 'ocu doctor' 检查到已授予的权限,并不保证操作一定能成功,某些权限变更仍需要重启进程。
只能在 Mac 上用吗?Linux 和 Windows 也行吗?它可以在 macOS、Linux 和 Windows 上运行,不过 macOS 有额外的权限要求,另外两个平台不需要这些。
这和普通的屏幕自动化机器人有什么不同?它基于操作系统的辅助功能(Accessibility)API 构建,而不是直接模拟像素或输入操作。这与 OpenAI 的 Codex Computer Use 所展示的非侵入式思路相同,因此更不容易失效,也与操作系统集成得更好。
哪些 AI 智能体或客户端开箱即可使用它?演示中它已可在 Codex App、Codex CLI 和 Gemini CLI 中作为 Computer Use 使用,并且提供了专门的 Claude Code 技能安装方式。
仓库里提到的 Cursor Motion 是什么?Cursor Motion 是项目中附带的一个独立开源 macOS 光标运动系统,基于 Software.Inc 团队公开分享的信息开发,可从 Releases 页面下载。
'ocu' 工具提供哪些命令行命令?除了 MCP 服务器模式之外,它还提供:'ocu js' 用于一次性执行 JS 代码;'ocu repl' 用于持久的终端会话;'ocu mcp' 暴露九个核心原生工具(macOS 上另加 query);'ocu doctor --json' 用于权限诊断;'ocu config' 用于保存截图格式等持久设置。
作者
iFurySt
大小
6.1 MB
星标
3K
时长
7个月
提交 · 90 天