Loading repository data…
Loading repository data…
demondehellis / repository
A Python-based command-line tool to programmatically control the Claude Desktop app using Playwright. PoC, for learning purposes only.
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
A Python-based command-line tool to programmatically control the Claude desktop app using Playwright.
Claude Controller is a utility that allows you to interact with the Claude AI desktop application programmatically. It uses Playwright to connect to the app via Chrome DevTools Protocol and enables you to:
This tool is useful for automating interactions with Claude, integrating Claude into other workflows, or creating custom interfaces on top of the Claude desktop app.
Clone the repository:
git clone https://github.com/demondehellis/claude-desktop-cli.git
cd claude-desktop-cli
Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Install Playwright browsers:
python -m playwright install
Create a .env file from the example:
cp .env.example .env
To use this tool, Claude must be running in debug mode:
/Applications/Claude.app/Contents/MacOS/Claude --remote-debugging-port=9333
"C:\Path\To\Claude.exe" --remote-debugging-port=9333
The tool provides several command-line options:
python main.py [OPTIONS]
--port PORT: Debug port (default: from CLAUDE_DEBUG_PORT or 9333)--message "Your message": Send a message to Claude--new-chat: Start a new chat--timeout SECONDS: Timeout in seconds for response--dialog-action [allow|allow-chat|deny]: Action to take on dialog--always-allow: Always allow running actions without asking--get-artifact: Get the content of the artifact panelpython main.py --new-chat --message "Hello, Claude! How are you today?"
python main.py --message "Can you help me with a Python script?"
python main.py --get-artifact
python main.py --message "Run ls -la" --always-allow
You can configure the tool by setting environment variables in your .env file:
CLAUDE_DEBUG_PORT: Debug port to connect to (default: 9333)CLAUDE_TIMEOUT: Default timeout for responses in secondsCLAUDE_SLOW_MO: Slow down Playwright operations (in ms, default: 900)MIT
Contributions are welcome! Please feel free to submit a Pull Request.