🎉 Cmdop v1.0 is here! Download now →
Skip to Content
DocsCLIOS Automation

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
  • xdotool for 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 --double

Keyboard Input

# Type text cmdop os keyboard type "Hello, World!" # Press key cmdop os keyboard press enter # Key combination cmdop os keyboard combo cmd+c

Screen Capture

# Full screenshot cmdop os screenshot # Region cmdop os screenshot --region 0,0,800,600 # Save to file cmdop os screenshot --output ~/screenshot.png

AI-Powered Automation

Use natural language with the AI:

cmdop chat
cmdop> open Chrome and go to github.com cmdop> click the sign in button cmdop> fill in my email and password

Automation 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+v

Run the script:

cmdop os run automation.yaml

Window 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 0

Application Control

# Launch app cmdop os app open "Visual Studio Code" # Close app cmdop os app close "Preview" # List running apps cmdop os app list

Use 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

OS Automation | Cmdop