# 🖥️ cu — Computer Use CLI 🚀 **Native GUI automation CLI for AI agents** — macOS та Windows. `cu-native` — це швидкий CLI для автоматизації графічного інтерфейсу через нативні Accessibility API. Працює напряму, без MCP серверів, Python, Node.js чи драйверів. ```bash # macOS (Swift, ~134KB) cu-native Safari state cu-native Safari click 5 cu-native Safari type "Hello" # Windows (Rust, ~297KB) cu-native.exe Notepad state cu-native.exe Notepad click 1 cu-native.exe Notepad type "Hello" ``` ## ⚡ Швидкодія | Операція | macOS | Windows | |----------|-------|---------| | State (кеш) | ~45ms | ~50ms | | State (холодний) | ~350ms | ~400ms | | Click | ~130ms | ~100ms | | Fill | ~180ms | ~150ms | | Type (10 символів) | ~50ms | ~60ms | ## 📦 Встановлення ### macOS ```bash # Завантажити з GitHub Releases curl -LO https://github.com/killsng/cu/releases/latest/download/cu-native-aarch64-apple-darwin chmod +x cu-native-aarch64-apple-darwin sudo cp cu-native-aarch64-apple-darwin /usr/local/bin/cu-native # Або зібрати з сорців swiftc -O -o cu-native cu.swift -framework Cocoa ``` ### Windows ```powershell # Завантажити з GitHub Releases curl -LO https://github.com/killsng/cu/releases/latest/download/cu-native-x86_64-pc-windows-gnu.exe ren cu-native-x86_64-pc-windows-gnu.exe cu-native.exe # Або зібрати з сорців (потрібен Rust) cargo build --release ``` ## ⌨️ Команди | Команда | Опис | |---------|------| | `state` | Список елементів | | `click ` | Клік на елементі | | `type ` | Друк тексту | | `fill ` | Заповнення поля | | `find ` | Пошук елемента | | `press ` | Натискання клавіші | | `scroll ` | Скрол | | `dclick ` | Подвійний клік (macOS) | | `workflow ` | Атомарний воркфлоу (macOS) | ## 🎯 Приклади ### macOS ```bash # Список елементів Safari cu-native Safari state # Клік на кнопку cu-native Safari click 5 # Заповнити текстове поле cu-native Safari fill 2 "https://github.com" # Друк тексту cu-native Safari type "Hello, world!" # Натискання клавіші cu-native Safari press enter # Пошук елемента cu-native Safari find "Search" ``` ### Windows ```powershell # Список елементів Notepad cu-native.exe Notepad state # Клік на елементі cu-native.exe Notepad click 1 # Друк тексту cu-native.exe Notepad type "Hello, Windows!" # Заповнити поле cu-native.exe Notepad fill 0 "Text" ``` ## 🔧 Як це працює **macOS:** Використовує Swift + macOS Accessibility API (AXUIElement) напряму через C-Framework. - `performClick` → `AXUIElementPerformAction` (Invoke/PRESS) - `fill` → `AXUIElementSetAttributeValue` (пряме вставлення тексту) - `type` → `CGEvent` (Unicode-символи через HID) **Windows:** Використовує Rust + Windows UI Automation API (COM). - `click` → `IUIAutomationInvokePattern` або `SendInput` - `fill` → `IUIAutomationValuePattern::SetValue` - `type` → `SendInput` з `KEYEVENTF_UNICODE` ## 📁 Структура репо ``` cu/ ├── cu.swift # Swift source (macOS) ├── CursorOverlay/ │ └── main.swift # Cursor overlay (macOS) ├── cu-native-windows/ │ ├── Cargo.toml # Rust project (Windows) │ └── src/ │ └── main.rs # Rust source (Windows) ├── cu.py # Legacy Python CLI (macOS) ├── cu-server/ # Legacy MCP server ├── skill-windows.md # Windows skill └── README.md ``` ## 📋 Вимоги - **macOS:** macOS 13+, Xcode CLI Tools (для збірки) - **Windows:** Windows 10/11, Rust (для збірки) Завантажити готові бінарники: [GitHub Releases](https://github.com/killsng/cu/releases) ---

Made with ❤️ for AI agents
📦 GitHub • ⬇️ Releases