{"id":46027073,"url":"https://github.com/plyght/superctrl","last_synced_at":"2026-03-01T03:09:07.699Z","repository":{"id":334079458,"uuid":"1139976958","full_name":"plyght/superctrl","owner":"plyght","description":"superctrl is an ai automation daemon for macOS.","archived":false,"fork":false,"pushed_at":"2026-01-22T20:03:07.000Z","size":122,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-23T10:25:31.621Z","etag":null,"topics":["computer-use","macos","openai","superwhisper","voice-control"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plyght.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-22T17:02:37.000Z","updated_at":"2026-01-22T20:03:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/plyght/superctrl","commit_stats":null,"previous_names":["plyght/superctrl"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/plyght/superctrl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plyght%2Fsuperctrl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plyght%2Fsuperctrl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plyght%2Fsuperctrl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plyght%2Fsuperctrl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plyght","download_url":"https://codeload.github.com/plyght/superctrl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plyght%2Fsuperctrl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29959284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-use","macos","openai","superwhisper","voice-control"],"created_at":"2026-03-01T03:09:06.234Z","updated_at":"2026-03-01T03:09:07.691Z","avatar_url":"https://github.com/plyght.png","language":"Rust","readme":"# superctrl\n\nVoice-controlled macOS automation powered by Anthropic's Computer Use API. Speak natural language commands to control your computer through a persistent menu bar daemon.\n\n## Overview\n\nsuperctrl bridges voice input and computer automation by integrating Superwhisper voice transcription with Anthropic's Claude Computer Use API. The system runs as a macOS menu bar application, listening for voice commands via macrowhisper trigger patterns and executing them through Claude's vision-enabled automation capabilities.\n\n## Features\n\n- **Voice Control**: Natural language commands via macrowhisper integration (\"Computer, open Safari and go to github.com\")\n- **Computer Use API**: Full Anthropic Claude Computer Use implementation with screenshot analysis and action execution\n- **Menu Bar Interface**: Real-time status, action history, and task control via native macOS menu bar\n- **Emergency Stop**: Global hotkey (Command+Shift+Escape) to halt any running automation\n- **Daemon Architecture**: IPC-based daemon with Unix socket communication for reliable background operation\n- **Learning System**: Optional keyboard and clipboard monitoring for behavior analysis\n- **Cross-Interface**: CLI, voice, and GUI control methods\n\n## Installation\n\n```bash\ngit clone https://github.com/yourusername/superctrl.git\ncd superctrl\n./install.sh\n```\n\nThe installation script will:\n- Build the release binary\n- Install to `/usr/local/bin/superctrl`\n- Configure macrowhisper action\n- Set up launchd daemon for automatic startup\n\n### Manual Installation\n\n```bash\ncargo build --release\nsudo cp target/release/superctrl /usr/local/bin/\nsudo chmod +x /usr/local/bin/superctrl\n\n./install-macrowhisper-action.sh\n\ncp superctrl.plist ~/Library/LaunchAgents/com.superctrl.daemon.plist\nlaunchctl load ~/Library/LaunchAgents/com.superctrl.daemon.plist\n```\n\nEdit the plist file to add your Anthropic API key before loading.\n\n## Usage\n\n### Voice Commands\n\nTrigger patterns (configurable in macrowhisper):\n\n```\nComputer, [command]\nAutomate [command]\nControl [command]\nDo this: [command]\n```\n\nExamples:\n\n```\n\"Computer, open Safari and navigate to github.com\"\n\"Automate taking a screenshot and saving to Desktop\"\n\"Control moving all PDFs from Downloads to Documents\"\n```\n\n### CLI\n\n```bash\nsuperctrl --execute \"open Terminal and run 'git status'\"\nsuperctrl status\nsuperctrl stop\n```\n\n### Menu Bar\n\nClick the menu bar icon to:\n- View current status and recent action history\n- Stop running tasks\n- Open preferences\n- Quit the application\n\n### Emergency Stop\n\nPress Command+Shift+Escape at any time to immediately halt execution.\n\n## Configuration\n\n### Environment Variables\n\n```bash\nexport ANTHROPIC_API_KEY=your-key-here\nexport SUPERCTRL_LEARNING_ENABLED=true\nexport SUPERCTRL_LEARNING_DB_PATH=~/.config/superctrl/learning.db\nexport SUPERCTRL_SYSTEM_PROMPT_PATH=~/.config/superctrl/system_prompt.txt\n```\n\n### macrowhisper Trigger Patterns\n\nEdit `~/.config/macrowhisper/macrowhisper.json`:\n\n```json\n{\n  \"scriptsShell\": {\n    \"superctrl\": {\n      \"action\": \"/usr/local/bin/superctrl --execute '{{swResult}}'\",\n      \"triggerVoice\": \"computer|automate|control|do this\"\n    }\n  }\n}\n```\n\n### Fish Shell Setup\n\nFish shell uses different syntax for environment variables:\n\n**Temporary (current session):**\n```fish\nset -x ANTHROPIC_API_KEY 'your-key-here'\n```\n\n**Permanent (add to `~/.config/fish/config.fish`):**\n```fish\nset -x ANTHROPIC_API_KEY 'your-key-here'\n```\n\n**Verify:**\n```fish\necho $ANTHROPIC_API_KEY\n```\n\n## Architecture\n\n- `computer_use.rs`: Anthropic Computer Use API loop with claude-sonnet-4-5\n- `automation.rs`: macOS action execution via enigo (mouse, keyboard, scroll)\n- `screenshot.rs`: Screen capture with xcap and automatic scaling\n- `menu_bar.rs`: Native menu bar implementation using tray-icon\n- `gui.rs`: Shared state management with Arc\u003cMutex\u003cGuiState\u003e\u003e\n- `hotkey.rs`: Global keyboard shortcut handling via global-hotkey\n- `ipc.rs`: Unix socket server for daemon communication\n- `learning.rs`: User behavior collection with SQLite storage\n- `cli.rs`: Command-line interface using clap\n\n## API Details\n\n- **Model**: claude-sonnet-4-5\n- **API**: Anthropic Messages API with computer-use-2025-01-24 beta\n- **Tools**: computer_20250124 tool version\n- **Display**: Automatic screen resolution detection with dynamic scaling\n- **Actions**: left_click, right_click, type, key, mouse_move, scroll, screenshot, double_click, triple_click, left_click_drag\n- **Safety**: 50 iteration limit, atomic stop flag, full trust mode toggle\n\n## Development\n\n```bash\ncargo build\ncargo test\ncargo clippy\ncargo fmt\n```\n\nRequires Rust 1.70+. Key dependencies: iced, tokio, reqwest, xcap, enigo, global-hotkey, tray-icon, rusqlite, rdev, arboard.\n\n### Running Locally\n\nTerminal 1 (daemon):\n```bash\nANTHROPIC_API_KEY=your-key cargo run\n```\n\nTerminal 2 (client):\n```bash\ncargo run -- --execute \"test command\"\n```\n\n### Testing IPC\n\n```bash\necho '{\"Execute\":{\"command\":\"test\"}}' | nc -U /tmp/superctrl.sock\n```\n\n### Testing Without Voice\n\n**Method 1: Direct CLI (simulates macrowhisper)**\n\n```bash\n./target/release/superctrl -e \"Open Safari\"\n./target/release/superctrl -e \"Take a screenshot\"\n```\n\n**Method 2: Quick Test Script**\n\n```bash\n./test_integration.sh\n```\n\nThis script checks daemon status, sends a test command, and shows results.\n\n## Requirements\n\n- macOS (10.15+)\n- Rust toolchain\n- Superwhisper with macrowhisper installed\n- Anthropic API key with Computer Use beta access\n- Accessibility permissions for keyboard shortcuts and automation\n\n## Security\n\n- Socket permissions restricted to owner only (0600)\n- API key loaded from environment, never hardcoded\n- No credential logging\n- Learning data stored locally with configurable opt-out\n- Command validation before execution\n\n## Troubleshooting\n\n### Check Daemon Status\n\n```bash\nsuperctrl status\n```\n\n### View Logs\n\n```bash\ntail -f ~/Library/Logs/superctrl.log\ntail -f ~/Library/Logs/superctrl.error.log\n```\n\n### Restart Daemon\n\n```bash\nlaunchctl unload ~/Library/LaunchAgents/com.superctrl.daemon.plist\nlaunchctl load ~/Library/LaunchAgents/com.superctrl.daemon.plist\n```\n\n### Verify macrowhisper Configuration\n\n```bash\nmacrowhisper --service-status\ncat ~/.config/macrowhisper/macrowhisper.json | grep -A 3 superctrl\n```\n\n## License\n\nMIT License\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplyght%2Fsuperctrl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplyght%2Fsuperctrl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplyght%2Fsuperctrl/lists"}