OS Automation
Automate desktop interactions programmatically.
Overview
Cmdop can control your desktop:
- Mouse movements and clicks
- Keyboard input
- Screen capture
- Window management
- Application control
Requirements
macOS
- Accessibility permissions required
- Grant in System Preferences > Security & Privacy > Accessibility
Windows
- Run as Administrator for some operations
Linux
- X11 or Wayland support
xdotoolfor X11 systems
Basic Commands
Mouse Control
# Move mouse
cmdop os mouse move 100 200
# Click
cmdop os mouse click
# Right click
cmdop os mouse click --button right
# Double click
cmdop os mouse click --doubleKeyboard Input
# Type text
cmdop os keyboard type "Hello, World!"
# Press key
cmdop os keyboard press enter
# Key combination
cmdop os keyboard combo cmd+cScreen Capture
# Full screenshot
cmdop os screenshot
# Region
cmdop os screenshot --region 0,0,800,600
# Save to file
cmdop os screenshot --output ~/screenshot.pngAI-Powered Automation
Use natural language with the AI:
cmdop chatcmdop> open Chrome and go to github.com
cmdop> click the sign in button
cmdop> fill in my email and passwordAutomation Scripts
Create automation scripts:
# automation.yaml
name: Daily Report
steps:
- open: "Google Sheets"
- wait: 2s
- keyboard:
combo: cmd+a
- keyboard:
combo: cmd+c
- open: "Slack"
- keyboard:
type: "Here's the daily report:"
- keyboard:
combo: cmd+vRun the script:
cmdop os run automation.yamlWindow Management
# List windows
cmdop os windows list
# Focus window
cmdop os windows focus "Terminal"
# Resize window
cmdop os windows resize "Terminal" 800 600
# Move window
cmdop os windows move "Terminal" 0 0Application Control
# Launch app
cmdop os app open "Visual Studio Code"
# Close app
cmdop os app close "Preview"
# List running apps
cmdop os app listUse Cases
- Automated Testing - UI testing workflows
- Data Entry - Automate repetitive form filling
- Reporting - Generate and share reports
- Integration - Connect apps that don’t have APIs