Open Computer Use

ifuryst/open-codex-computer-use/skills/open-computer-use

作者 ifuryst93b817501e0b無授權條款2.3K 個星標收錄於 2026年10月9日更新於 2026年10月9日儲存庫2 天前更新

Platform-neutral guidance for using Open Computer Use, the open-source Computer Use MCP server and CLI for macOS, Linux, and Windows. Use when an agent needs to install, verify, troubleshoot, configure, or operate Open Computer Use through its native CLI, stdio MCP server, or direct Computer Use tool calls.

AI 產生的概覽

指導代理安裝、設定與操作 Open Computer Use 命令列工具與 MCP 伺服器,以進行桌面 GUI 自動化。

功能
提供跨平台使用 Open Computer Use 的說明,這是一套適用於 macOS、Linux 與 Windows 的開源 Computer Use MCP 伺服器與命令列工具。內容涵蓋檢查安裝、執行診斷、檢視應用程式、取得介面狀態,以及執行以元素為目標的點擊、輸入、捲動與拖曳等操作。也說明了 MCP 設定、直接命令列呼叫與疑難排解參考。
適用情境
當代理需要安裝、驗證、設定、排解問題或操作 Open Computer Use 的命令列工具、stdio MCP 伺服器或直接 Computer Use 工具呼叫時使用。也適用於在 macOS、Linux 或 Windows 上自動化桌面 GUI 工作。
執行需求
需要安裝 open-computer-use 或 ocu 命令列工具,macOS 需 14.0 或更新版本。GUI 自動化在 macOS 上需要輔助使用與螢幕錄製權限,在 Windows 與 Linux 上需要已登入的桌面工作階段。不附帶指令碼,僅為說明文件。

Open Computer Use

Overview

Open Computer Use exposes Computer Use as a local CLI and stdio MCP server. It is not Codex.app-specific; adapt the commands and MCP config to the agent runtime you are operating in.

The macOS runtime requires macOS 14.0 or later. Windows and Linux use their own platform runtimes and are not subject to this macOS minimum.

It supports the same core tool surface across macOS, Linux, and Windows: list_apps, get_app_state, click, perform_secondary_action, scroll, drag, type_text, press_key, and set_value.

Core Workflow

  1. On macOS, run sw_vers -productVersion before invoking the CLI and require macOS 14.0 or later. On older versions, explain that the runtime cannot launch; do not recommend doctor or permission changes as a fix for binary incompatibility.
  2. Check the CLI is installed with open-computer-use -h or ocu -h. If installation or setup is missing, read references/installation.md [blocked].
  3. On supported macOS versions, run open-computer-use doctor before the first real GUI task. If permissions are missing, ask the user to approve Accessibility and Screen Recording in the onboarding UI.
  4. Inspect available apps before acting: open-computer-use call list_apps.
  5. Capture current UI state with open-computer-use call get_app_state --args '{"app":"TextEdit"}'. The default state is usually enough for UI operation.
  6. When the task needs longer semantic text, such as chat history, email bodies, document text, or long form content, call get_app_state with text_limit: 1000 or text_limit: "max".
  7. When visible long pages or lists appear incomplete even after scrolling, call get_app_state with a larger max_tree_nodes or max_tree_depth.
  8. Prefer element-targeted actions using element_index from the latest get_app_state result.
  9. For multi-step CLI work, use open-computer-use call --calls '<json-array>' so one process can reuse the latest element index mapping.
  10. For agent runtimes that support local MCP servers, configure open-computer-use mcp or ocu mcp and call the exposed Computer Use tools directly. Read references/usage.md [blocked].
  11. For direct code-first orchestration, run ocu capabilities and then use one-shot ocu js or persistent ocu repl. Read references/usage.md [blocked].
  12. If communication, permission, or desktop-session access fails, read references/troubleshooting.md [blocked].

Operating Rules

  • Treat the target desktop as the user's real session. Do not inspect password managers, unrelated private content, or sensitive apps unless the user explicitly asked for that task.
  • Ask before sending, deleting, purchasing, approving, uploading, or making other externally visible changes.
  • Do not assume Codex.app plugin helpers are available. Use the installed open-computer-use / ocu CLI or an explicit MCP config.
  • Always run get_app_state before using element_index; do not guess indexes across sessions or after large UI changes.
  • Prefer semantic actions and set_value for editable controls. Use coordinate click, scroll, and drag only when the element tree does not expose a safer target.
  • On macOS, do not enable OPEN_COMPUTER_USE_ALLOW_GLOBAL_POINTER_FALLBACKS=1 unless the user explicitly requested click_method: "global", a drag that must drive a window-server drag session (window move, drag-select text, Finder drag-and-drop), or other diagnostic behavior that may move the real pointer. Without it drag reports Drag delivered via app_post and those operations have no effect; see references/usage.md for alternatives.
  • On Windows and Linux, confirm the command is running inside the logged-in desktop session before assuming GUI automation is available.

Common CLI Actions

sh
open-computer-use -hocu -hocu capabilities --jsonocu js 'nodeRepl.write(6 * 7)'ocu replopen-computer-use doctoropen-computer-use call list_appsocu call list_appsopen-computer-use call get_app_state --args '{"app":"TextEdit"}'open-computer-use call get_app_state --args '{"app":"TextEdit","text_limit":1000}'open-computer-use call get_app_state --args '{"app":"TextEdit","text_limit":"max"}'open-computer-use call get_app_state --args '{"app":"Google Chrome","max_tree_nodes":3000,"max_tree_depth":96}'open-computer-use call click --args '{"app":"TextEdit","element_index":"0"}'open-computer-use call type_text --args '{"app":"TextEdit","text":"Hello from Open Computer Use"}'

For a short sequence that reuses state in one process:

sh
open-computer-use call --calls '[  {"tool":"get_app_state","args":{"app":"TextEdit"}},  {"tool":"press_key","args":{"app":"TextEdit","key":"Return"}}]'

MCP Usage

For runtimes that can launch local MCP servers over stdio, use:

toml
[mcp_servers.open_computer_use]command = "open-computer-use"args = ["mcp"]

Read references/usage.md [blocked] for JSON config examples, direct tool-call patterns, and platform notes.

References

  • references/installation.md [blocked]: one-time CLI install, agent MCP install commands, and macOS permissions.
  • references/usage.md [blocked]: MCP config, direct CLI calls, sequencing, and platform behavior.
  • references/troubleshooting.md [blocked]: permission, desktop-session, app discovery, and action failures.

來源與署名

來源:ifuryst/open-codex-computer-use位於skills/open-computer-use提交93b8175

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架