# Debug build
make build
# Release build (universal binary: ARM64 + x86_64)
make release
# Run tests (non-parallel to avoid UI conflicts)
make test
# Run the server
make run
# Install to /usr/local/bin
make install
# Show all available commands
make help
1. Launch Calculator:
launch_application(bundle_id: "com.apple.calculator")
2. Type a calculation:
type_text(bundle_id: "com.apple.calculator", text: "7+3")
3. Press equals:
send_shortcut(bundle_id: "com.apple.calculator", key: "return", modifiers: [])
4. Get the result:
get_element_tree(bundle_id: "com.apple.calculator", max_depth: 5)
5. Capture the result:
capture_window(bundle_id: "com.apple.calculator")
查找和单击元素
1. Find a button:
find_elements(bundle_id: "com.apple.calculator", role: "AXButton", title: "5")
2. Click using the returned path:
click(bundle_id: "com.apple.calculator", path: {...})
菜单导航
1. Open a menu item:
navigate_menu(bundle_id: "com.apple.TextEdit", menu_path: "File > Save As...")
2. Get all menu items:
get_menu_structure(bundle_id: "com.apple.TextEdit")
文件对话框工作流
1. Navigate to Save As dialog:
navigate_menu(bundle_id: "com.apple.TextEdit", menu_path: "File > Save As...")
2. Navigate to Desktop:
navigate_dialog(bundle_id: "com.apple.TextEdit", path: "~/Desktop")
3. Set filename:
set_filename(bundle_id: "com.apple.TextEdit", filename: "mydocument.txt")
4. Save:
confirm_dialog(bundle_id: "com.apple.TextEdit")
窗口管理
1. List all windows:
list_windows(bundle_id: "com.apple.finder")
2. Move and resize:
set_window_bounds(bundle_id: "com.apple.finder", x: 100, y: 100, width: 800, height: 600)
3. Minimize:
minimize_window(bundle_id: "com.apple.finder")
剪贴板操作
1. Copy text to clipboard:
write_clipboard(text: "Hello, World!")
2. Read clipboard:
read_clipboard()