عن المشروع

# open-computer-use `open-computer-use` هي خدمة `Computer Use` مفتوحة المصدر مغلفة كـ `MCP` (Model Context Protocol). يمكن لأي وكيل ذكاء اصطناعي أو عميل MCP استخدامها لتشغيل Computer Use على macOS وLinux وWindows. استُلهم هذا المشروع من [Codex Computer Use](https://openai.com/index/codex-for-almost-everything/) من OpenAI. وقد أظهر أنه يمكن بناء CUA (Computer Use Agent) غير تدخّلي فوق واجهات برمجة إمكانية الوصول (Accessibility APIs)، لذا يوفّر هذا المشروع تنفيذًا مفتوح المصدر. ## العروض التوضيحية - **Codex App وCodex CLI**: يُستخدم كـ Computer Use في Codex App وCodex CLI، بما يطابق التجربة الرسمية. - **Gemini CLI**: يتصل بـ `open-computer-use` عبر MCP وينفّذ إجراءات Computer Use الكاملة. - **Linux**: يعمل على Linux. ## البدء السريع ```bash npm i -g open-computer-use ``` كما يوفّر حزمة npm الاسم المختصر `ocu` كمرادف لسطر الأوامر CLI. > **مهم**: يتطلب وقت التشغيل على macOS الإصدار 14.0 أو أحدث. **على macOS، شغّله مرة واحدة وامنح `Accessibility` و`Screen Recording`. لا تحتاج Windows وLinux إلى هذه الخطوة.** ```bash open-computer-use # or ocu ``` قبل استخدامه، ثبّته في وكيلك: ```bash # Install into Codex by writing to ~/.codex/config.toml open-computer-use install-codex-mcp ``` أو أضفه إلى عميلك يدويًا: ```json { "mcpServers": { "open-computer-use": { "command": "open-computer-use", "args": ["mcp"] } } } ``` ## المهارة (Skill) ثبّت المهارة مباشرة: ```bash # Install for Codex npx skills add iFurySt/open-codex-computer-use -g -a codex --skill open-computer-use -y npx skills ls -g -a codex | rg 'open-computer-use' ``` التثبيت لـ Claude Code: ```bash npx skills add iFurySt/open-codex-computer-use -g -a claude-code --skill open-computer-use -y ``` تحديث تثبيت عام موجود، بما في ذلك تثبيت Codex المُنشأ أعلاه: ```bash npx skills update open-computer-use -g -y ``` يمكنك أيضًا تنزيل وتثبيت مهارة [`open-computer-use`](./skills/open-computer-use) يدويًا. ## مزيد من الأوامر إلى جانب إعداد MCP JSON أعلاه، يمكنك أيضًا استخدام الأوامر المدمجة: ```bash # Install into Codex by writing to ~/.codex/config.toml open-computer-use install-codex-mcp ocu 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 # Install through DeepSeek Harness's generic MCP compatibility path open-computer-use install-dsh-mcp ./scripts/install-dsh-mcp.sh --profile web --no-hook # 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"}' # Inspect code-first runtime availability ocu capabilities ocu capabilities --json # Run one JavaScript evaluation, from an argument, stdin, or a file ocu js 'var apps = await cua.listApps({ emit: false }); nodeRepl.write(apps)' printf '%s' 'nodeRepl.write(6 * 7)' | ocu js - ocu js --file ./automation.mjs # Keep JavaScript and cua bindings for the current terminal session ocu repl # Run a sequence in one process so element_index state can be reused 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 # Run local validation from a source checkout make smoke OPEN_COMPUTER_USE_STRESS_LOOPS=20 make stress make agent-smoke make agent-smoke SCENARIO=fixture-full node ./scripts/run-agent-smoke-tests.mjs --agents=claude,codex --command=open-computer-use node ./scripts/run-agent-smoke-tests.mjs --scenario=fixture --agents=claude,codex --command=open-computer-use node ./scripts/run-agent-smoke-tests.mjs --scenario=fixture-full --agents=claude,codex --command=open-computer-use OPEN_COMPUTER_USE_HERMES_PROVIDER=anthropic OPEN_COMPUTER_USE_HERMES_MODEL=claude-opus-4-20250514 make agent-smoke AGENTS=hermes SCENARIO=fixture-full node ./scripts/run-agent-smoke-tests.mjs --agents=hermes --hermes-provider=anthropic --hermes-model=claude-opus-4-20250514 node ./scripts/run-agent-smoke-tests.mjs --scenario=fixture --agents=hermes --hermes-provider=anthropic --hermes-model=claude-opus-4-20250514 node ./scripts/run-agent-smoke-tests.mjs --scenario=fixture-full --agents=hermes --hermes-provider=anthropic --hermes-model=claude-opus-4-20250514 --hermes-max-turns=12 # Show help open-computer-use -h ocu -h ``` يغلق `ocu js` عامل JavaScript التابع له وعملية MCP الأصلية الفرعية بعد تقييم واحد. ويحتفظ `ocu repl` بهما لجلسة الطرفية الحالية حتى `.exit` أو Ctrl-D أو الإنهاء؛ ويُفرّغ `.reset` ارتباطاته. على macOS، قد يبقى وكيل الأذونات المخفي المنفصل `Open Computer Use.app` مقيمًا حتى تعيد الأوامر اللاحقة استخدام هوية الأذونات نفسها. ويستمر `ocu mcp` في إتاحة سطح التوافق الأصلي ذي الأدوات التسع. يتطلب مشغّل npm نفسه حاليًا Node.js 18 أو أحدث. وتعرض مساعدته دائمًا `js` / `repl`، بينما يبلّغ `ocu capabilities --json` عمّا إذا كانت Node ومهايئ/نواة REPL ووقت التشغيل الأصلي متاحة. وبمجرد بدئه، يعيد استخدام ملف Node التنفيذي الحالي بدلًا من البحث عن `node` آخر في PATH. ## حركة المؤشر حركة المؤشر (Cursor Motion) هي نظام حركة مؤشر مفتوح المصدر لـ macOS، يستند إلى معلومات عامة شاركها أعضاء من فريق Software.Inc. يمكنك تنزيل التطبيق من [صفحة الإصدارات](https://github.com/iFurySt/open-codex-computer-use/releases). ## سجل النجوم راجع [مخطط سجل النجوم](https://www.star-history.com/?repos=iFurySt%2Fopen-codex-computer-use&type=date&legend=top-left) لمعرفة شعبية المشروع عبر الزمن. ## الترخيص [MIT](./LICENSE).