wcgw

wcgw

Shell and coding agent on claude desktop app

Stars: 94

Visit
 screenshot

wcgw is a shell and coding agent designed for Claude and Chatgpt. It provides full shell access with no restrictions, desktop control on Claude for screen capture and control, interactive command handling, large file editing, and REPL support. Users can use wcgw to create, execute, and iterate on tasks, such as solving problems with Python, finding code instances, setting up projects, creating web apps, editing large files, and running server commands. Additionally, wcgw supports computer use on Docker containers for desktop control. The tool can be extended with a VS Code extension for pasting context on Claude app and integrates with Chatgpt for custom GPT interactions.

README:

Shell and Coding agent for Claude and Chatgpt

  • Claude - An MCP server on claude desktop for autonomous shell and coding agent. (mac only)
  • Chatgpt - Allows custom gpt to talk to your shell via a relay server. (linux or mac)

⚠️ Warning: do not use this repo if you aren't scared of "Autonomous shell command execution"

Tests Mypy strict Build codecov

Updates

🚀 Highlights

  • Create, Execute, Iterate: Ask claude to keep running compiler checks till all errors are fixed, or ask it to keep checking for the status of a long running command till it's done.
  • Large file edit: Supports large file incremental edits to avoid token limit issues. Faster than full file write.
  • Syntax checking on edits: Reports feedback to the LLM if its edits have any syntax errors, so that it can redo it.
  • Interactive Command Handling: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.
  • Full Shell Access: No restrictions, complete control.

Top use cases examples

  • Solve problem X using python, create and run test cases and fix any issues. Do it in a temporary directory
  • Find instances of code with X behavior in my repository
  • Git clone https://github.com/my/repo in my home directory, then understand the project, set up the environment and build
  • Create a golang htmx tailwind webapp, then open browser to see if it works (use with puppeteer mcp)
  • Edit or update a large file
  • In a separate branch create feature Y, then use github cli to create a PR to original branch
  • Command X is failing in Y directory, please run and fix issues
  • Using X virtual environment run Y command
  • Using cli tools, create build and test an android app. Finally run it using emulator for me to use
  • Fix all mypy issues in my repo at X path.
  • Using 'screen' run my server in background instead, then run another api server in bg, finally run the frontend build. Keep checking logs for any issues in all three
  • Create repo wide unittest cases. Keep iterating through files and creating cases. Also keep running the tests after each update. Do not modify original code.

Claude Setup

First install uv using homebrew brew install uv

(Important: use homebrew to install uv. Otherwise make sure uv is present in a global location like /usr/bin/)

Then update claude_desktop_config.json (~/Library/Application Support/Claude/claude_desktop_config.json)

{
  "mcpServers": {
    "wcgw": {
      "command": "uv",
      "args": [
        "tool",
        "run",
        "--from",
        "wcgw@latest",
        "--python",
        "3.12",
        "wcgw_mcp"
      ]
    }
  }
}

Then restart claude app.

If there's an error in setting up

  • If there's an error like "uv ENOENT", make sure uv is installed. Then run 'which uv' in the terminal, and use its output in place of "uv" in the configuration.
  • If there's still an issue, check that uv tool run --from wcgw@latest --python 3.12 wcgw_mcp runs in your terminal. It should have no output and shouldn't exit.
  • Debug the mcp server using npx @modelcontextprotocol/[email protected] uv tool run --from wcgw@latest --python 3.12 wcgw_mcp

Usage

Wait for a few seconds. You should be able to see this icon if everything goes right.

mcp icon over here

mcp icon

Then ask claude to execute shell commands, read files, edit files, run your code, etc.

[Optional] Vs code extension

https://marketplace.visualstudio.com/items?itemName=AmanRusia.wcgw

Commands:

  • Select a text and press cmd+' and then enter instructions. This will switch the app to Claude and paste a text containing your instructions, file path, workspace dir, and the selected text.

Chatgpt Setup

Read here: https://github.com/rusiaaman/wcgw/blob/main/openai.md

Examples

example

[Optional] Local shell access with openai API key or anthropic API key

Openai

Add OPENAI_API_KEY and OPENAI_ORG_ID env variables.

Then run

uvx --from wcgw@latest wcgw_local --limit 0.1 # Cost limit $0.1

You can now directly write messages or press enter key to open vim for multiline message and text pasting.

Anthropic

Add ANTHROPIC_API_KEY env variable.

Then run

uvx --from wcgw@latest wcgw_local --claude

You can now directly write messages or press enter key to open vim for multiline message and text pasting.

For Tasks:

Click tags to check more tools for each tasks

For Jobs:

Alternative AI tools for wcgw

Similar Open Source Tools

For similar tasks

For similar jobs