{"id":25636179,"url":"https://github.com/PallavAg/claude-computer-use-macos","last_synced_at":"2025-02-23T00:02:18.484Z","repository":{"id":259364436,"uuid":"877135718","full_name":"PallavAg/claude-computer-use-macos","owner":"PallavAg","description":"MacOS Demo for Claude Computer Use","archived":false,"fork":false,"pushed_at":"2024-10-24T04:02:46.000Z","size":20,"stargazers_count":210,"open_issues_count":6,"forks_count":38,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-17T14:11:12.399Z","etag":null,"topics":["anthropic","claude","computeruse"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PallavAg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2024-10-23T06:36:04.000Z","updated_at":"2025-02-16T10:31:51.000Z","dependencies_parsed_at":"2024-10-24T21:36:01.508Z","dependency_job_id":"c2eb6b59-8205-425c-87e5-bdd5e56f3fb6","html_url":"https://github.com/PallavAg/claude-computer-use-macos","commit_stats":null,"previous_names":["pallavag/claude-computer-use-macos"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PallavAg%2Fclaude-computer-use-macos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PallavAg%2Fclaude-computer-use-macos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PallavAg%2Fclaude-computer-use-macos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PallavAg%2Fclaude-computer-use-macos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PallavAg","download_url":"https://codeload.github.com/PallavAg/claude-computer-use-macos/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240250363,"owners_count":19771780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["anthropic","claude","computeruse"],"created_at":"2025-02-23T00:02:17.451Z","updated_at":"2025-02-23T00:02:18.448Z","avatar_url":"https://github.com/PallavAg.png","language":"Python","funding_links":[],"categories":["Projects"],"sub_categories":["Frameworks \u0026 Models"],"readme":"# Claude Computer Use Demo for MacOS\n\nThis repository contains a Python script that demonstrates Anthropic's Computer Use capabilities, modified to run on MacOS without requiring a Docker container. The script allows Claude 3.5 Sonnet to perform tasks on your Mac by simulating mouse and keyboard actions as well as running bash command.\n\nForked from Anthropic's [computer use demo](https://github.com/anthropics/anthropic-quickstarts/tree/main/computer-use-demo) - optimized for MacOS.\nView Anthropic's docs [here](https://docs.anthropic.com/en/docs/build-with-claude/computer-use).\n\n\u003e [!WARNING]  \n\u003e Use this script with caution. Allowing Claude to control your computer can be risky. By running this script, you assume all responsibility and liability.\n\n## Installation and Setup\n\n1. **Clone the repository:**\n\n   ```bash\n   git clone https://github.com/PallavAg/claude-computer-use-macos.git\n   cd claude-computer-use-macos\n   ```\n\n2. **Create a virtual environment + install dependencies:**\n\n   ```bash\n   python3.12 -m venv venv\n   source venv/bin/activate\n   pip3.12 install -r requirements.txt\n   ```\n\n3. **Set your Anthropic API key as an environment variable:**\n\n   ```bash\n   export ANTHROPIC_API_KEY=\"CLAUDE_API_KEY\"\n   ```\n\n   Replace `CLAUDE_API_KEY` with your actual Anthropic API key. You find yours [here](https://console.anthropic.com/settings/keys).\n\n4. **Grant Accessibility Permissions:**\n\n   The script uses `pyautogui` to control mouse and keyboard events. On MacOS, you need to grant accessibility permissions. These popups should show automatically the first time you run the script so you can skip this step. But to manually provide permissions:\n\n   - Go to **System Preferences** \u003e **Security \u0026 Privacy** \u003e **Privacy** tab.\n   - Select **Accessibility** from the list on the left.\n   - Add your terminal application or Python interpreter to the list of allowed apps.\n\n## Usage\n\nYou can run the script by passing the instruction directly via the command line or by editing the `main.py` file.\n\n**Example using command line instruction:**\n\n```bash\npython3.12 main.py 'Open Safari and look up Anthropic'\n```\n\nReplace `'Open Safari and look up Anthropic'` with your desired instruction.\n\n**Note:** If you do not provide an instruction via the command line, the script will use the default instruction specified in `main.py`. You can edit `main.py` to change this default instruction.\n\n## Exiting the Script\n\nYou can quit the script at any time by pressing `Ctrl+C` in the terminal.\n\n## ⚠ Disclaimer\n\n\u003e [!CAUTION]\n\u003e - **Security Risks:** This script allows claude to control your computer's mouse and keyboard and run bash commands. Use it at your own risk.\n\u003e - **Responsibility:** By running this script, you assume all responsibility and liability for any results.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPallavAg%2Fclaude-computer-use-macos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FPallavAg%2Fclaude-computer-use-macos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FPallavAg%2Fclaude-computer-use-macos/lists"}