Shell and coding agent on Claude and ChatGPT.
- Claude: An MCP server on Claude Desktop for an autonomous shell and coding agent. (mac only)
- ChatGPT: Allows custom GPT to communicate with your shell via a relay server. (Linux or mac)
ā ļø Warning: Do not allow the BashCommand tool without reviewing the command, as it may result in data loss.
š Highlights
- ā” Create, Execute, Iterate: Ask Claude to keep running compiler checks until all errors are fixed, or check the status of a long-running command until it's done.
- ā” Large File Edit: Supports large file incremental edits to avoid token limit issues. Faster than full file writes.
- ā” Syntax Checking on Edits: Provides feedback to the LLM if its edits have syntax errors so that it can redo them.
- ā” Interactive Command Handling: Supports interactive commands using arrow keys, interrupt, and ANSI escape sequences.
- ā” File Protections:
- The AI must read a file at least once before editing or rewriting it to avoid accidental overwrites.
- Avoids context filling while reading large files by chunking based on token length.
- Returns the provided workspace's directory structure after selecting important files.
- Uses spacing-tolerant matching for file edits, with warnings for issues like indentation mismatches.
- ā” Shell Optimizations:
- Only one command can run at a time, simplifying management and avoiding rogue processes.
- Always returns the current working directory after any shell command to prevent the AI from getting lost.
- ā” Saving Repo Context in a Single File: Task checkpointing using the "ContextSave" tool saves detailed context in one file.
- ā” Easily Switch Between Various Modes:
- 'Architect' mode for planning.
- 'Code-writer' mode for code editing and project building.
- Default 'wcgw' mode has no restrictions and full authorization.
Top Use Cases
- Solve problem X using Python, create and run test cases, and fix any issues in a temporary directory.
- Find instances of code with behavior X in a repository.
- Git clone a repository in the home directory, understand the project, set up the environment, and build.
- Create a Golang HTMX Tailwind web app and open a browser to check its functionality.
- Edit or update a large file.
- In a separate branch, create feature Y and use the GitHub CLI to create a PR to the original branch.
- Run and fix issues for a failing command in a specified directory.
- Use a virtual environment to run a command.
- Create, build, and test an Android app, then run it using an emulator.
- Fix all MyPy issues in a repository at a specified path.
- Run multiple servers in the background while monitoring logs for issues.
- Create repository-wide unit test cases while iterating through files and running tests after each update.
Modes
There are three built-in modes. You may ask Claude to run in one of the modes, such as "Use 'architect' mode".
| Mode | Description | Allows | Denies | Invoke Prompt | |-----------------|-----------------------------------------------------------------------------|---------------------------------------------------------|----------------------------------------------|----------------------------------------------------------------------------------------------------| | Architect | Work with Claude to investigate and understand your repository. | Read-only commands | FileEdit and Write tools | Run in mode='architect' | | Code-writer | For code writing and development | Specified path globs for editing or writing | FileEdit for paths not matching specified glob| Run in code writer mode, only 'tests/**' allowed | | wcgw | Default mode with everything allowed | Everything | Nothing | No prompt, or "Run in wcgw mode" |
Optional: VS Code Extension
Commands:
- Select text, press
cmd+'
, and enter instructions to switch the app to Claude and paste your instructions along with the file path and workspace directory.
ChatGPT Setup
For additional setup instructions, please refer to the relevant documentation.
Examples
Directly interact with the system to execute various tasks and commands effectively.