Skip to Content

OS Automation

TL;DR

CMDOP OS automation controls desktop environments programmatically. Move the mouse, click, type text, press key combinations, take screenshots, manage windows, and launch applications. Supports macOS, Windows, and Linux. Use natural language via cmdop chat or create YAML automation scripts. Requires accessibility permissions on macOS.

Automate desktop interactions programmatically.

What can CMDOP OS automation do?

Cmdop can control your desktop:

  • Mouse movements and clicks
  • Keyboard input
  • Screen capture
  • Window management
  • Application control

What are the 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

What are the basic commands?

How do I control the mouse?

# 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

How do I send 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

How do I capture the screen?

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

How do I use AI-powered automation?

Use natural language with the AI:

# Start natural language OS automation via AI chat cmdop chat
cmdop> open Chrome and go to github.com cmdop> click the sign in button cmdop> fill in my email and password

How do I create 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:

# Execute a YAML-defined desktop automation script cmdop os run automation.yaml

How do I manage windows?

# 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

How do I control applications?

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

What are the common 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
Last updated on