Documentation for Claude Code showing how to grant Claude CLI access to interact with your computer and run commands.
Computer use lets Claude open apps, control your screen, and work on your machine the way you would. From the CLI, Claude can compile a Swift app, launch it, click through every button, and screenshot the result, all in the same conversation where it wrote the code. This page covers how computer use works in the CLI. For the Desktop app on macOS or Windows, see computer use in Desktop.What you can do with computer use Computer use handles tasks that require a GUI: anything you’d normally have to leave the terminal and do by hand. Build and validate native apps: ask Claude to build a macOS menu bar app. Claude writes the Swift, compiles it, launches it, and clicks through every control to verify it works before you ever open it. End-to-end UI testing: point Claude at a local Electron app and say “test the onboarding flow.” Claude opens the app, clicks through signup, and screenshots each step. No Playwright config, no test harness. Debug visual and layout issues: tell Claude “the modal is clipping on small windows.” Claude resizes the window, reproduces the bug, screenshots it, patches the CSS, and verifies the fix. Claude sees what you see. Drive GUI-only tools: interact with design tools, hardware control panels, the iOS Simulator, or proprietary apps that have no CLI or API.
When computer use applies Claude has several ways to interact with an app or service. Computer use is the broadest and slowest, so Claude tries the most precise tool first: If you have an MCP server for the service, Claude uses that. If the task is a shell command, Claude uses Bash. If the task is browser work and you have Claude in Chrome set up, Claude uses that. If none of those apply, Claude uses computer use.
Screen control is reserved for things nothing else can reach: native apps, simulators, and tools without an API. In the Desktop app, running or testing an iOS app opens the dedicated iOS Simulator pane rather than screen control; from the CLI, computer use is how Claude reaches the