ru

rusiaaman/wcgw

๐Ÿ ๐Ÿ  Autonomous shell execution, computer control and coding agent. (Mac)

#python#automation#macOS
Publisherrusiaaman/wcgw
Submitted date4/19/2025

Shell and Coding Agent for Claude and ChatGPT

Overview

Title

Shell and Coding Agent for Claude and ChatGPT

How to Use

Empower chat applications like Claude and ChatGPT to write, execute, and iterate on code directly on your local machine.

  • Claude: Uses an MCP server with tightly integrated shell and code editing tools.
  • ChatGPT: Enables custom GPT models to interact with your shell via a relay server (supports Linux, macOS, and Windows via WSL).

โš ๏ธ Warning: Always review Bash commands before execution to prevent potential data loss.

Key Features

  • Code Execution & Iteration: Run compiler checks or monitor long-running commands until completion.
  • Large File Handling: Smart incremental edits to avoid token limits.
  • Syntax Checking: Validates edits and provides feedback to the LLM for corrections.
  • Interactive Shell: Supports arrow keys, interrupts, and ANSI escape sequences.
  • File Protections:
    • Prevents accidental overwrites by requiring file reads before edits.
    • Chunks large files based on token length.
    • Uses .gitignore and statistical methods to identify important files.
  • Shell Optimizations:
    • Single-command execution to avoid rogue processes.
    • Always returns the current working directory to prevent disorientation.
    • Command polling with smart timeout handling.
  • Context Saving: Save task checkpoints in a single file for easy resumption or knowledge transfer.
  • Multiple Modes:
    • Architect Mode: Plan before coding for better accuracy.
    • Code-Writer Mode: Focus on editing and building projects.
    • WCGW Mode: Full authorization with no restrictions.
  • Terminal Multiplexing: Attach to the AIโ€™s terminal session (screen -x) for monitoring or interaction.

Use Cases

  • Code Development: Solve problems, write tests, and fix issues in a temporary directory.
  • Repository Management: Clone, set up, and build projects.
  • Large File Editing: Safely modify extensive files without token limits.
  • Debugging: Run and fix failing commands in specific directories.
  • Multi-Process Management: Run background servers and monitor logs.
  • Automated Testing: Generate and execute unit tests iteratively.

Setup

  • Claude (Mac/Linux): Install uv via Homebrew and configure claude_desktop_config.json.
  • Windows (WSL): Install uv and update the config file in %APPDATA%\Claude\.

For detailed setup instructions, troubleshooting, and demo, refer to the full documentation.

๐Ÿš€ Highlights: Fast iteration, secure file handling, and seamless shell integration make this tool ideal for AI-assisted coding.

Visit More

View All