[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-rusiaaman--wcgw":3,"tool-rusiaaman--wcgw":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":76,"owner_avatar_url":77,"owner_bio":78,"owner_company":79,"owner_location":80,"owner_email":79,"owner_twitter":79,"owner_website":79,"owner_url":81,"languages":82,"stars":91,"forks":92,"last_commit_at":93,"license":94,"difficulty_score":23,"env_os":95,"env_gpu":96,"env_ram":96,"env_deps":97,"category_tags":104,"github_topics":105,"view_count":23,"oss_zip_url":79,"oss_zip_packed_at":79,"status":16,"created_at":122,"updated_at":123,"faqs":124,"releases":145},3122,"rusiaaman\u002Fwcgw","wcgw","Shell and coding agent on mcp clients","wcgw 是一款专为 Claude 等支持 MCP 协议的 AI 客户端设计的本地 Shell 与编程助手。它让大模型能够直接在您的计算机上执行代码编写、编译构建及命令运行任务，将聊天对话转化为实际的开发操作。\n\n该工具主要解决了 AI 代理在本地环境中“动口不动手”的局限，通过提供完全交互式的终端体验，使开发者能实时观察并干预 AI 的执行过程。它特别适合需要高效自动化工作流的软件开发者和极客用户，尤其是那些希望利用 AI 进行复杂调试、批量文件处理或长期任务监控的专业人士。\n\nwcgw 拥有多项独特的技术亮点：支持后台多命令并行执行与 ZSH  shell；具备大文件增量编辑能力，智能规避令牌限制；内置语法检查机制，若 AI 生成的代码有误会自动反馈修正；同时采用严格的文件保护策略，要求 AI 必须先读取文件方可编辑，防止意外覆盖。配合其 VS Code 扩展，用户甚至可以直接接入 AI 正在操作的终端，实现人机协同的最佳编码体验。需要注意的是，由于 wcgw 赋予 AI 极高的系统权限，使用时请务必评估安全风险。","# Shell and Coding agent for Claude and other mcp clients\n\nEmpowering chat applications to code, build and run on your local machine.\n\nwcgw is an MCP server with tightly integrated shell and code editing tools.\n\n> ⚠️ **Warning**: This MCP server provides unfiltered access to your machine's shell and files. It does not restrict LLMs from executing arbitrary commands or making unintended changes. This tool can be misused by attackers or run dangerous commands if the AI hallucinates. Run this repository **only** if you fully understand and accept the risks associated with running AI agents with no restrictions.\n\nAs of 2026 the reason you could use `wcgw` is that it provides fully interactive shell experience that you and the agent both can control (including sending key-strokes). \nCombined with the wcgw vscode extension that attaches the agent's shell in your editor, you can get the best agentic shell experience that is out there.\nThe file editing tricks and the general minimalism also helps agent be more productive.\n\n\n[![Tests](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-tests.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-tests.yml)\n[![Mypy strict](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-types.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-types.yml)\n[![Build](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-publish.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-publish.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Frusiaaman\u002Fwcgw\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Frusiaaman\u002Fwcgw)\n\n## Demo\n\n![Workflow Demo](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_29233ceede97.gif)\n\n## Updates\n\n- [6 Oct 2025] Model can now run multiple commands in background. ZSH is now a supported shell. Multiplexing improvements.\n\n- [27 Apr 2025] Removed support for GPTs over relay server. Only MCP server is supported in version >= 5.\n\n- [24 Mar 2025] Improved writing and editing experience for sonnet 3.7, CLAUDE.md gets loaded automatically.\n\n- [16 Feb 2025] You can now attach to the working terminal that the AI uses. See the \"attach-to-terminal\" section below.\n\n- [15 Jan 2025] Modes introduced: architect, code-writer, and all powerful wcgw mode.\n\n- [8 Jan 2025] Context saving tool for saving relevant file paths along with a description in a single file. Can be used as a task checkpoint or for knowledge transfer.\n\n- [29 Dec 2024] Syntax checking on file writing and edits is now stable. Made `initialize` tool call useful; sending smart repo structure to claude if any repo is referenced. Large file handling is also now improved.\n\n- [9 Dec 2024] [Vscode extension to paste context on Claude app](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw)\n\n## 🚀 Highlights\n\n- ⚡ **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.\n- ⚡ **Large file edit**: Supports large file incremental edits to avoid token limit issues. Smartly selects when to do small edits or large rewrite based on % of change needed.\n- ⚡ **Syntax checking on edits**: Reports feedback to the LLM if its edits have any syntax errors, so that it can redo it.\n- ⚡ **Interactive Command Handling**: Supports interactive commands using arrow keys, interrupt, and ansi escape sequences.\n- ⚡ **File protections**:\n  - The AI needs to read a file at least once before it's allowed to edit or rewrite it. This avoids accidental overwrites.\n  - Avoids context filling up while reading very large files. Files get chunked based on token length.\n  - On initialisation the provided workspace's directory structure is returned after selecting important files (based on .gitignore as well as a statistical approach)\n  - File edit based on search-replace tries to find correct search block if it has multiple matches based on previous search blocks. Fails otherwise (for correctness).\n  - File edit has spacing tolerant matching, with warning on issues like indentation mismatch. If there's no match, the closest match is returned to the AI to fix its mistakes.\n  - Using Aider-like search and replace, which has better performance than tool call based search and replace.\n- ⚡ **Shell optimizations**:\n  - Current working directory is always returned after any shell command to prevent AI from getting lost.\n  - Command polling exits after a quick timeout to avoid slow feedback. However, status checking has wait tolerance based on fresh output streaming from a command. Both of these approach combined provides a good shell interaction experience.\n  - Supports multiple concurrent background commands alongside the main interactive shell.\n- ⚡ **Saving repo context in a single file**: Task checkpointing using \"ContextSave\" tool saves detailed context in a single file. Tasks can later be resumed in a new chat asking \"Resume `task id`\". The saved file can be used to do other kinds of knowledge transfer, such as taking help from another AI.\n- ⚡ **Easily switch between various modes**:\n  - Ask it to run in 'architect' mode for planning. Inspired by adier's architect mode, work with Claude to come up with a plan first. Leads to better accuracy and prevents premature file editing.\n  - Ask it to run in 'code-writer' mode for code editing and project building. You can provide specific paths with wild card support to prevent other files getting edited.\n  - By default it runs in 'wcgw' mode that has no restrictions and full authorisation.\n  - More details in [Modes section](#modes)\n- ⚡ **Runs in multiplex terminal** Use [vscode extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw) or run `screen -x` to attach to the terminal that the AI runs commands on. See history or interrupt process or interact with the same terminal that AI uses.\n- ⚡ **Automatically load CLAUDE.md\u002FAGENTS.md** Loads \"CLAUDE.md\" or \"AGENTS.md\" file in project root and sends as instructions during initialisation. Instructions in a global \"~\u002F.wcgw\u002FCLAUDE.md\" or \"~\u002F.wcgw\u002FAGENTS.md\" file are loaded and added along with project specific CLAUDE.md. The file name is case sensitive. CLAUDE.md is attached if it's present otherwise AGENTS.md is attached.\n\n## Claude setup (using mcp)\n\n### Mac and linux\n\nFirst install `uv` using homebrew `brew install uv`\n\n(**Important:** use homebrew to install uv. Otherwise make sure `uv` is present in a global location like \u002Fusr\u002Fbin\u002F)\n\nThen create or update `claude_desktop_config.json` (~\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json) with following json.\n\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"uvx\",\n      \"args\": [\"wcgw@latest\"]\n    }\n  }\n}\n```\n\nThen restart claude app.\n\n**Optional: Force a specific shell**\n\nTo use a specific shell (bash or zsh), add the `--shell` argument:\n\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"uvx\",\n      \"args\": [\"wcgw@latest\", \"--shell\", \"\u002Fbin\u002Fbash\"]\n    }\n  }\n}\n```\n\n_If there's an error in setting up_\n\n- 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.\n- If there's still an issue, check that `uv tool run --python 3.12 wcgw` runs in your terminal. It should have no output and shouldn't exit.\n- Try removing ~\u002F.cache\u002Fuv folder\n- Try using `uv` version `0.6.0` for which this tool was tested.\n- Debug the mcp server using `npx @modelcontextprotocol\u002Finspector@0.1.7 uv tool run --python 3.12 wcgw`\n\n### Windows on wsl\n\nThis mcp server works only on wsl on windows.\n\nTo set it up, [install uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F)\n\nThen add or update the claude config file `%APPDATA%\\Claude\\claude_desktop_config.json` with the following\n\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"wsl.exe\",\n      \"args\": [\"uvx\", \"wcgw@latest\"]\n    }\n  }\n}\n```\nWhen you encounter an error, execute the command wsl uv --python 3.12 wcgw in command prompt. If you get the `error \u002Fbin\u002Fbash: line 1: uv: command not found`, it means uv was not installed globally and you need to point to the correct path of uv.\n1. Find where uv is installed:\n```bash\nwhereis uv\n```\nExample output:\n```uv: \u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv```\n\n2. Test the full path works:\n```\nwsl \u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv tool run --python 3.12 wcgw\n```\n\n3. Update the config with the full path:\n```\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"wsl.exe\",\n      \"args\": [\"\u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv\", \"tool\", \"run\", \"--python\", \"3.12\", \"wcgw\"]\n    }\n  }\n}\n```\nReplace `\u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv` with your actual uv path from step 1.\n\n### Usage\n\nWait for a few seconds. You should be able to see this icon if everything goes right.\n\n![mcp icon](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_9ef65a9bd143.png)\nover here\n\n![mcp icon](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_ab52608eb427.jpg)\n\nThen ask claude to execute shell commands, read files, edit files, run your code, etc.\n\n#### Task checkpoint or knowledge transfer\n\n- You can do a task checkpoint or a knowledge transfer by attaching \"KnowledgeTransfer\" prompt using \"Attach from MCP\" button.\n- On running \"KnowledgeTransfer\" prompt, the \"ContextSave\" tool will be called saving the task description and all file content together in a single file. An id for the task will be generated.\n- You can in a new chat say \"Resume '\u003Ctask id>'\", the AI should then call \"Initialize\" with the task id and load the context from there.\n- Or you can directly open the file generated and share it with another AI for help.\n\n#### Modes\n\nThere are three built-in modes. You may ask Claude to run in one of the modes, like \"Use 'architect' mode\"\n| **Mode** | **Description** | **Allows** | **Denies** | **Invoke prompt** |\n|-----------------|-----------------------------------------------------------------------------|---------------------------------------------------------|----------------------------------------------|----------------------------------------------------------------------------------------------------|\n| **Architect** | Designed for you to work with Claude to investigate and understand your repo. | Read-only commands | FileEdit and Write tool | Run in mode='architect' |\n| **Code-writer** | For code writing and development | Specified path globs for editing or writing, specified commands | FileEdit for paths not matching specified glob, Write for paths not matching specified glob | Run in code writer mode, only 'tests\u002F**' allowed, only uv command allowed |\n| **wcgw\\*\\* | Default mode with everything allowed | Everything | Nothing | No prompt, or \"Run in wcgw mode\" |\n\nNote: in code-writer mode either all commands are allowed or none are allowed for now. If you give a list of allowed commands, Claude is instructed to run only those commands, but no actual check happens. (WIP)\n\n#### Attach to the working terminal to investigate\n\nNEW: the [vscode extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw) now automatically attach the running terminal\nif workspace path matches.\n\nIf you've `screen` command installed, wcgw runs on a screen instance automatically. If you've started wcgw mcp server, you can list the screen sessions:\n\n`screen -ls`\n\nAnd note down the wcgw screen name which will be something like `93358.wcgw.235521` where the last number is in the hour-minute-second format.\n\nYou can then attach to the session using `screen -x 93358.wcgw.235521`\n\nYou may interrupt any running command safely.\n\nYou can interact with the terminal safely, for example for entering passwords, or entering some text. (Warning: If you run a new command, any new LLM command will interrupt it.)\n\nYou shouldn't exit the session using `exit `or Ctrl-d, instead you should use `ctrl+a+d` to safely detach without destroying the screen session.\n\nInclude the following in ~\u002F.screenrc for better scrolling experience\n```\ndefscrollback 10000\ntermcapinfo xterm* ti@:te@\n```\n\n### [Optional] Vs code extension\n\nhttps:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw\n\nCommands:\n\n- 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.\n\n## Examples\n\n![example](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_e7ae64d147d8.jpg)\n\n## Using mcp server over docker\n\nFirst build the docker image `docker build -t wcgw https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw.git`\n\nThen you can update `\u002FUsers\u002Fusername\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json` to have\n\n```\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"--mount\",\n        \"type=bind,src=\u002FUsers\u002Fusername\u002FDesktop,dst=\u002Fworkspace\u002FDesktop\",\n        \"wcgw\"\n      ]\n    }\n  }\n}\n```\n\n## Tools\n\nThe server provides the following MCP tools:\n\n**Shell Operations:**\n\n- `Initialize`: Reset shell and set up workspace environment\n  - Parameters: `any_workspace_path` (string), `initial_files_to_read` (string[]), `mode_name` (\"wcgw\"|\"architect\"|\"code_writer\"), `task_id_to_resume` (string)\n- `BashCommand`: Execute shell commands with timeout control\n  - Parameters: `command` (string), `wait_for_seconds` (int, optional)\n  - Parameters: `send_text` (string) or `send_specials` ([\"Enter\"|\"Key-up\"|...]) or `send_ascii` (int[]), `wait_for_seconds` (int, optional)\n\n**File Operations:**\n\n- `ReadFiles`: Read content from one or more files\n  - Parameters: `file_paths` (string[])\n- `WriteIfEmpty`: Create new files or write to empty files\n  - Parameters: `file_path` (string), `file_content` (string)\n- `FileEdit`: Edit existing files using search\u002Freplace blocks\n  - Parameters: `file_path` (string), `file_edit_using_search_replace_blocks` (string)\n- `ReadImage`: Read image files for display\u002Fprocessing\n  - Parameters: `file_path` (string)\n\n**Project Management:**\n\n- `ContextSave`: Save project context and files for Knowledge Transfer or saving task checkpoints to be resumed later\n  - Parameters: `id` (string), `project_root_path` (string), `description` (string), `relevant_file_globs` (string[])\n\nAll tools support absolute paths and include built-in protections against common errors. See the [MCP specification](https:\u002F\u002Fmodelcontextprotocol.io\u002F) for detailed protocol information.\n","# 用于 Claude 及其他 MCP 客户端的 Shell 和编码代理\n\n赋能聊天应用在您的本地机器上进行编码、构建和运行。\n\nwcgw 是一个与 shell 和代码编辑工具紧密集成的 MCP 服务器。\n\n> ⚠️ **警告**: 本 MCP 服务器提供对您机器 shell 和文件的无过滤访问权限。它不会限制 LLM 执行任意命令或进行意外更改。如果 AI 产生幻觉，该工具可能被攻击者滥用或执行危险命令。请仅在您完全理解并接受运行无限制 AI 代理相关风险的情况下才运行此仓库。\n\n截至 2026 年，您可以使用 `wcgw` 的原因是它提供了完全交互式的 shell 体验，您和代理都可以控制（包括发送按键输入）。\n结合将代理的 shell 挂载到您编辑器中的 wcgw VSCode 扩展，您可以获得目前市场上最佳的代理式 shell 体验。\n文件编辑技巧和整体极简设计也有助于提高代理的工作效率。\n\n\n[![测试](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-tests.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-tests.yml)\n[![Mypy 严格模式](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-types.yml\u002Fbadge.svg?branch=main)](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-types.yml)\n[![构建](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-publish.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Factions\u002Fworkflows\u002Fpython-publish.yml)\n[![codecov](https:\u002F\u002Fcodecov.io\u002Fgh\u002Frusiaaman\u002Fwcgw\u002Fgraph\u002Fbadge.svg)](https:\u002F\u002Fcodecov.io\u002Fgh\u002Frusiaaman\u002Fwcgw)\n\n## 演示\n\n![工作流演示](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_29233ceede97.gif)\n\n## 更新日志\n\n- [2025年10月6日] 模型现在可以在后台运行多个命令。ZSH 现已成为支持的 shell。多路复用功能得到改进。\n\n- [2025年4月27日] 移除了对通过中继服务器使用 GPT 的支持。从版本 5 开始，仅支持 MCP 服务器。\n\n- [2025年3月24日] 改进了 sonnet 3.7 的编写和编辑体验，CLAUDE.md 会自动加载。\n\n- [2025年2月16日] 您现在可以附加到 AI 使用的工作终端。请参阅下方的“attach-to-terminal”部分。\n\n- [2025年1月15日] 引入了三种模式：架构师模式、代码编写模式以及全能的 wcgw 模式。\n\n- [2025年1月8日] 提供了上下文保存工具，可将相关文件路径连同描述一起保存到单个文件中。可用作任务检查点或知识转移之用。\n\n- [2024年12月29日] 文件写入和编辑时的语法检查现已稳定。使 `initialize` 工具调用变得更有用；当引用任何代码库时，会向 Claude 发送智能的代码库结构信息。同时，大文件处理能力也得到了提升。\n\n- [2024年12月9日] [VSCode 扩展可在 Claude 应用中粘贴上下文](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw)\n\n## 🚀 亮点\n\n- ⚡ **创建、执行、迭代**: 您可以让 Claude 不断运行编译器检查，直到所有错误都被修复；或者让它持续监控长时间运行命令的状态，直到完成。\n- ⚡ **大文件编辑**: 支持大文件的增量编辑，以避免 token 限制问题。根据所需更改的比例，智能选择是进行小范围编辑还是大规模重写。\n- ⚡ **编辑时的语法检查**: 如果 LLM 的编辑存在语法错误，系统会反馈给它，以便其重新修改。\n- ⚡ **交互式命令处理**: 支持使用方向键、中断信号和 ANSI 转义序列的交互式命令。\n- ⚡ **文件保护措施**:\n  - AI 必须至少读取一次文件后才能对其进行编辑或重写，从而避免意外覆盖。\n  - 在读取超大文件时，避免上下文过载。文件会根据 token 长度进行分块。\n  - 初始化时，会返回所提供工作区的目录结构，并从中挑选重要文件（基于 .gitignore 文件及统计方法）。\n  - 基于搜索替换的文件编辑会尝试找到正确的搜索区域，即使有多个匹配项，也会根据之前的搜索结果来判断。否则将失败（以确保准确性）。\n  - 文件编辑采用间距容错匹配机制，并会在缩进不一致等问题时发出警告。如果没有匹配项，则会返回最接近的匹配结果，供 AI 修正错误。\n  - 使用类似 Aider 的搜索和替换功能，其性能优于基于工具调用的搜索和替换。\n- ⚡ **Shell 优化**:\n  - 每次执行 shell 命令后，都会返回当前工作目录，以防止 AI 迷失方向。\n  - 命令轮询会在短暂超时后退出，以避免反馈延迟。然而，状态检查则会根据命令实时输出流调整等待时间。这两种方式相结合，能够提供良好的 shell 交互体验。\n  - 支持在主交互式 shell 之外同时运行多个后台命令。\n- ⚡ **将代码库上下文保存为单个文件**: 使用“ContextSave”工具进行任务检查点保存，可将详细上下文保存到一个文件中。之后，您可以在新的对话中通过询问“Resume `task id`”来恢复任务。保存的文件也可用于其他形式的知识转移，例如让另一台 AI 提供帮助。\n- ⚡ **轻松切换不同模式**:\n  - 您可以要求它以“架构师模式”进行规划。受 Aider 架构师模式启发，先与 Claude 合作制定计划，这样可以提高准确性并防止过早编辑文件。\n  - 您也可以要求它以“代码编写模式”进行代码编辑和项目构建。您可以提供特定路径，并支持通配符，以防止其他文件被编辑。\n  - 默认情况下，它以“wcgw 模式”运行，该模式没有任何限制且拥有完全授权。\n  - 更多详情请参阅 [模式章节](#modes)。\n- ⚡ **在多路复用终端中运行** 使用 [VSCode 插件](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw) 或运行 `screen -x` 来连接到 AI 执行命令的终端。您可以查看历史记录、中断进程，或与 AI 使用的同一终端进行交互。\n- ⚡ **自动加载 CLAUDE.md\u002FAGENTS.md** 自动加载项目根目录下的“CLAUDE.md”或“AGENTS.md”文件，并在初始化时将其作为指令发送。此外，还会加载全局“~\u002F.wcgw\u002FCLAUDE.md”或“~\u002F.wcgw\u002FAGENTS.md”文件的内容，并与项目特定的 CLAUDE.md 一同添加。文件名区分大小写。如果存在 CLAUDE.md，则会附加该文件；否则将附加 AGENTS.md。\n\n## 使用 MCP 设置 Claude\n\n### Mac 和 Linux\n\n首先使用 Homebrew 安装 `uv`：`brew install uv`。\n\n（**重要提示**：请务必使用 Homebrew 安装 `uv`。否则，请确保 `uv` 已安装在全局路径下，例如 `\u002Fusr\u002Fbin\u002F`。）\n\n然后创建或更新 `claude_desktop_config.json` 文件（路径为 `~\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json`），内容如下：\n\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"uvx\",\n      \"args\": [\"wcgw@latest\"]\n    }\n  }\n}\n```\n\n接着重启 Claude 应用程序。\n\n**可选：强制指定特定的 Shell**\n\n如果需要使用特定的 Shell（如 `bash` 或 `zsh`），可以在配置中添加 `--shell` 参数：\n\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"uvx\",\n      \"args\": [\"wcgw@latest\", \"--shell\", \"\u002Fbin\u002Fbash\"]\n    }\n  }\n}\n```\n\n_如果在设置过程中出现错误_\n\n- 如果出现类似 `uv ENOENT` 的错误，请确认 `uv` 是否已正确安装。然后在终端运行 `which uv`，将输出结果替换配置中的 `uv`。\n- 如果问题仍然存在，请检查是否能在终端成功运行 `uv tool run --python 3.12 wcgw`。该命令应无任何输出且不会退出。\n- 尝试删除 `~\u002F.cache\u002Fuv` 文件夹。\n- 尝试使用版本 `0.6.0` 的 `uv`，因为本工具正是基于该版本测试的。\n- 使用以下命令调试 MCP 服务器：`npx @modelcontextprotocol\u002Finspector@0.1.7 uv tool run --python 3.12 wcgw`。\n\n### Windows 上的 WSL\n\n此 MCP 服务器仅适用于 Windows 上的 WSL 环境。\n\n要进行设置，请先[安装 `uv`](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F)。\n\n然后编辑或更新 Claude 配置文件 `%APPDATA%\\Claude\\claude_desktop_config.json`，内容如下：\n\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"wsl.exe\",\n      \"args\": [\"uvx\", \"wcgw@latest\"]\n    }\n  }\n}\n```\n\n遇到错误时，在命令提示符中执行 `wsl uv --python 3.12 wcgw` 命令。如果出现 `\u002Fbin\u002Fbash: line 1: uv: command not found` 错误，则说明 `uv` 未全局安装，需指定正确的 `uv` 路径。\n\n1. 查找 `uv` 的安装位置：\n   ```bash\n   whereis uv\n   ```\n   示例输出：\n   ```uv: \u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv```\n\n2. 测试完整路径是否有效：\n   ```\n   wsl \u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv tool run --python 3.12 wcgw\n   ```\n\n3. 更新配置文件，使用完整路径：\n   ```\n   {\n     \"mcpServers\": {\n       \"wcgw\": {\n         \"command\": \"wsl.exe\",\n         \"args\": [\"\u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv\", \"tool\", \"run\", \"--python\", \"3.12\", \"wcgw\"]\n       }\n     }\n   }\n   ```\n   请将 `\u002Fhome\u002Fmywsl\u002F.local\u002Fbin\u002Fuv` 替换为你实际的 `uv` 路径。\n\n### 使用方法\n\n等待几秒钟后，如果一切正常，你应该能看到如下图标：\n\n![mcp 图标](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_9ef65a9bd143.png)\n在此处\n\n![mcp 图标](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_ab52608eb427.jpg)\n\n随后你可以让 Claude 执行 Shell 命令、读取文件、编辑文件、运行代码等操作。\n\n#### 任务检查点或知识转移\n\n- 你可以通过点击“从 MCP 附加”按钮来附加“KnowledgeTransfer”提示，从而实现任务检查点或知识转移。\n- 当运行“KnowledgeTransfer”提示时，“ContextSave”工具会被调用，将任务描述和所有文件内容保存到一个单独的文件中，并生成一个任务 ID。\n- 在新的对话中，你可以说“恢复 '\u003C任务ID>'”，AI 将会调用“Initialize”并加载相应的上下文。\n- 或者直接打开生成的文件，将其分享给其他 AI 寄托处理。\n\n#### 模式\n\n内置三种模式。你可以要求 Claude 切换到其中一种模式，例如“使用 'architect' 模式”。\n\n| **模式** | **描述** | **允许** | **拒绝** | **调用提示** |\n|-----------------|-----------------------------------------------------------------------------|---------------------------------------------------------|----------------------------------------------|----------------------------------------------------------------------------------------------------|\n| **Architect** | 专为与 Claude 合作调查和理解你的代码库而设计。 | 只读命令 | 禁止 FileEdit 和 Write 工具 | 运行模式='architect' |\n| **Code-writer** | 用于代码编写和开发 | 允许编辑或写入指定路径的文件，以及执行指定命令 | 禁止编辑或写入不符合指定 glob 模式的路径 | 运行代码编写模式，仅允许 'tests\u002F**' 路径，且仅限使用 uv 命令 |\n| **wcgw\\*\\*** | 默认模式，所有功能均开放 | 全部开放 | 无限制 | 不需提示，或直接说“切换到 wcgw 模式” |\n\n注意：目前在代码编写模式下，要么所有命令都允许，要么全部禁止。如果你提供允许的命令列表，Claude 会被指示只执行这些命令，但实际上并不会进行检查。（开发中）\n\n#### 附加到工作终端以进行调查\n\n新增功能：[VS Code 插件](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw) 现在会在工作区路径匹配时自动附加正在运行的终端。\n\n如果你已安装 `screen` 命令，wcgw 会自动在一个 screen 实例上运行。若已启动 wcgw MCP 服务器，可以列出 screen 会话：\n\n`screen -ls`\n\n记下 wcgw 的 screen 名称，格式类似于 `93358.wcgw.235521`，其中最后的数字表示时分秒。\n\n然后可以通过以下命令附加到该会话：\n\n`screen -x 93358.wcgw.235521`\n\n你可以安全地中断任何正在运行的命令。\n\n也可以安全地与终端交互，例如输入密码或文本。（警告：如果启动新命令，任何新的 LLM 命令都会中断当前操作。）\n\n切勿使用 `exit` 或 `Ctrl-d` 退出会话，而应使用 `ctrl+a+d` 安全分离，以免破坏 screen 会话。\n\n为了获得更好的滚动体验，请在 `~\u002F.screenrc` 中加入以下内容：\n```\ndefscrollback 10000\ntermcapinfo xterm* ti@:te@\n```\n\n### [可选] VS Code 插件\n\nhttps:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw\n\n命令：\n\n- 选择一段文本，按下 `cmd+'`，然后输入指令。这会将应用切换到 Claude，并粘贴包含你的指令、文件路径、工作区目录以及所选文本的内容。\n\n## 示例\n\n![示例](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_readme_e7ae64d147d8.jpg)\n\n## 通过 Docker 使用 MCP 服务器\n\n首先构建 Docker 镜像：`docker build -t wcgw https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw.git`。\n\n然后可以更新 `\u002FUsers\u002Fusername\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json`，内容如下：\n\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\",\n        \"-i\",\n        \"--rm\",\n        \"--mount\",\n        \"type=bind,src=\u002FUsers\u002Fusername\u002FDesktop,dst=\u002Fworkspace\u002FDesktop\",\n        \"wcgw\"\n      ]\n    }\n  }\n}\n```\n\n## 工具\n\n该服务器提供以下 MCP 工具：\n\n**Shell 操作：**\n\n- `Initialize`：重置 Shell 并设置工作区环境\n  - 参数：`any_workspace_path`（字符串）、`initial_files_to_read`（字符串数组）、`mode_name`（“wcgw”、“architect”或“code_writer”）、`task_id_to_resume`（字符串）\n- `BashCommand`：执行带有超时控制的 Shell 命令\n  - 参数：`command`（字符串）、`wait_for_seconds`（整数，可选）\n  - 参数：`send_text`（字符串）或 `send_specials`（[“Enter”、“Key-up”等]）或 `send_ascii`（整数数组）、`wait_for_seconds`（整数，可选）\n\n**文件操作：**\n\n- `ReadFiles`：从一个或多个文件中读取内容\n  - 参数：`file_paths`（字符串数组）\n- `WriteIfEmpty`：创建新文件或将内容写入空文件\n  - 参数：`file_path`（字符串）、`file_content`（字符串）\n- `FileEdit`：使用搜索\u002F替换块编辑现有文件\n  - 参数：`file_path`（字符串）、`file_edit_using_search_replace_blocks`（字符串）\n- `ReadImage`：读取图像文件以供显示或处理\n  - 参数：`file_path`（字符串）\n\n**项目管理：**\n\n- `ContextSave`：保存项目上下文和文件，用于知识转移或保存任务检查点以便后续恢复\n  - 参数：`id`（字符串）、`project_root_path`（字符串）、`description`（字符串）、`relevant_file_globs`（字符串数组）\n\n所有工具均支持绝对路径，并内置针对常见错误的防护机制。有关详细协议信息，请参阅 [MCP 规范](https:\u002F\u002Fmodelcontextprotocol.io\u002F)。","# wcgw 快速上手指南\n\nwcgw 是一个专为 Claude 及其他 MCP 客户端设计的 Shell 和代码代理服务器。它赋予聊天应用在本地机器上编写、构建和运行代码的能力，提供完全交互式的 Shell 体验。\n\n> ⚠️ **安全警告**：此工具提供对本地 Shell 和文件的**无过滤访问权限**。它不会限制 AI 执行任意命令或进行意外更改。若 AI 产生幻觉或被恶意利用，可能导致危险操作。请仅在您完全理解并接受相关风险的前提下使用。\n\n## 环境准备\n\n### 系统要求\n- **macOS \u002F Linux**: 原生支持\n- **Windows**: 仅支持通过 **WSL (Windows Subsystem for Linux)** 运行\n- **Python**: 推荐 Python 3.12+ (由 `uv` 自动管理)\n\n### 前置依赖\n需要安装 `uv` 包管理器。\n\n**macOS \u002F Linux (推荐使用 Homebrew):**\n```bash\nbrew install uv\n```\n*注意：请确保 `uv` 安装在全局路径（如 `\u002Fusr\u002Fbin\u002F`），否则后续配置可能失败。*\n\n**Windows (WSL):**\n请在 WSL 环境中参考官方文档安装 `uv`：\n```bash\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n```\n\n## 安装步骤\n\n### 1. 配置 Claude Desktop\n\n找到并编辑 Claude 的配置文件 `claude_desktop_config.json`。\n\n#### macOS \u002F Linux\n文件路径：`~\u002FLibrary\u002FApplication Support\u002FClaude\u002Fclaude_desktop_config.json`\n\n添加以下内容：\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"uvx\",\n      \"args\": [\"wcgw@latest\"]\n    }\n  }\n}\n```\n\n**可选：指定 Shell**\n如需强制使用特定 Shell（如 bash 或 zsh）：\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"uvx\",\n      \"args\": [\"wcgw@latest\", \"--shell\", \"\u002Fbin\u002Fbash\"]\n    }\n  }\n}\n```\n\n#### Windows (WSL)\n文件路径：`%APPDATA%\\Claude\\claude_desktop_config.json`\n\n首先查找 `uv` 在 WSL 中的绝对路径：\n```bash\nwsl whereis uv\n# 示例输出：uv: \u002Fhome\u002Fuser\u002F.local\u002Fbin\u002Fuv\n```\n\n使用找到的绝对路径更新配置文件：\n```json\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"wsl.exe\",\n      \"args\": [\"\u002Fhome\u002Fuser\u002F.local\u002Fbin\u002Fuv\", \"tool\", \"run\", \"--python\", \"3.12\", \"wcgw\"]\n    }\n  }\n}\n```\n*请将 `\u002Fhome\u002Fuser\u002F.local\u002Fbin\u002Fuv` 替换为您实际的 `uv` 路径。*\n\n### 2. 重启应用\n保存配置文件后，完全退出并重新启动 Claude Desktop 应用。\n\n### 3. 验证安装\n启动成功后，在 Claude 输入框附近应能看到一个 🚀 图标，表示 MCP 服务已就绪。\n\n## 基本使用\n\n配置完成后，您可以直接在 Claude 对话中下达指令，wcgw 将自动处理本地操作。\n\n### 核心功能示例\n\n**1. 执行 Shell 命令与迭代修复**\n让 AI 运行命令并自动修复错误：\n> \"请运行编译器检查，如果有错误请自动修复，直到所有测试通过。\"\n\n**2. 文件读写与编辑**\nAI 会自动读取项目结构（尊重 `.gitignore`），并在编辑前读取文件内容以防误覆盖。\n> \"读取 `src\u002Fmain.py`，将其中的日志级别改为 DEBUG，并保存。\"\n\n**3. 交互式终端操作**\n支持需要交互的命令（如输入密码、使用方向键）。\n> \"运行 `npm init` 并按提示完成初始化。\"\n\n### 进阶模式 (Modes)\n\n您可以通过自然语言切换 AI 的工作模式：\n\n| 模式 | 用途 | 指令示例 |\n| :--- | :--- | :--- |\n| **Architect** | 仅只读，用于分析项目结构和制定计划，禁止修改文件。 | \"请使用 'architect' 模式分析这个项目。\" |\n| **Code-writer** | 限制编辑范围，仅允许修改指定路径或运行特定命令。 | \"进入 'code-writer' 模式，只允许修改 'tests\u002F**' 目录。\" |\n| **wcgw** | 默认模式，拥有完全权限（无限制）。 | \"使用默认的 wcgw 模式。\" |\n\n### 附加到终端 (Attach to Terminal)\n\n您可以实时查看或干预 AI 正在操作的终端会话。\n\n**方法 A：使用 VS Code 插件 (推荐)**\n安装 [wcgw VS Code Extension](https:\u002F\u002Fmarketplace.visualstudio.com\u002Fitems?itemName=AmanRusia.wcgw)，当工作区路径匹配时，它会自动附加到 AI 的终端。\n\n**方法 B：使用 Screen 命令**\n如果系统安装了 `screen`，wcgw 会自动在其上运行。\n1. 列出会话：\n   ```bash\n   screen -ls\n   ```\n2. 附加到会话（替换为您的实际会话名）：\n   ```bash\n   screen -x 93358.wcgw.235521\n   ```\n3. **安全分离**：按下 `Ctrl+a` 然后按 `d` 即可分离会话，切勿直接使用 `exit` 或 `Ctrl+d` 关闭，以免终止 AI 进程。\n\n### 任务断点与上下文保存\n\n使用 \"ContextSave\" 工具可以将当前任务状态、文件内容和描述保存到单个文件中。\n- **保存**：在对话中点击 \"Attach from MCP\" 并选择 \"KnowledgeTransfer\" prompt。\n- **恢复**：在新对话中输入 \"Resume `\u003Ctask_id>`\"，AI 将加载之前的上下文继续工作。","后端工程师正在紧急修复一个遗留的 Python 微服务项目，需要在本地快速定位并解决因依赖冲突导致的编译错误及运行时异常。\n\n### 没有 wcgw 时\n- 开发者需在聊天窗口复制代码、手动切换到终端粘贴执行，遇到交互式命令（如选择菜单）时流程直接中断，无法继续。\n- 修改大文件时经常触发 Token 限制，导致 AI 只能输出片段，开发者必须多次往返拼接代码，极易出错。\n- AI 生成的代码若存在语法错误，无法自动感知，需人工运行编译器报错后，再手动将错误信息反馈给 AI 进行下一轮修正。\n- 长时间运行的构建任务缺乏实时监控，开发者只能被动等待或频繁手动查询状态，严重拖慢调试节奏。\n\n### 使用 wcgw 后\n- wcgw 提供完全交互式的 Shell 体验，AI 可直接在后台运行多条命令并处理箭头键选择等交互操作，开发者可通过 VS Code 插件实时“附身”观察终端动态。\n- 针对大文件，wcgw 智能采用增量编辑策略，自动判断是局部替换还是整体重写，完美规避 Token 上限，确保大模块重构一气呵成。\n- 内置语法检查机制会在写入文件前自动验证，一旦发现错误立即反馈给 AI 自我修正，实现“编写 - 检查 - 修复”的自动化闭环。\n- 支持让 AI 持续监控长耗时任务（如编译或测试），直到任务完成或失败才通知用户，释放人力专注于逻辑设计。\n\nwcgw 通过将无限制的本地 Shell 控制权与智能代码编辑深度结合，把原本割裂的“对话 - 执行”流程转化为流畅的自主开发闭环。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Frusiaaman_wcgw_5337b628.png","rusiaaman","Aman Rusia","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Frusiaaman_44958c27.png","NLP, Deep learning",null,"Bengaluru","https:\u002F\u002Fgithub.com\u002Frusiaaman",[83,87],{"name":84,"color":85,"percentage":86},"Python","#3572A5",99.5,{"name":88,"color":89,"percentage":90},"Dockerfile","#384d54",0.5,655,62,"2026-03-31T07:51:00","Apache-2.0","macOS, Linux, Windows (仅限 WSL)","未说明",{"notes":98,"python":99,"dependencies":100},"该工具是一个 MCP 服务器，提供对本地 Shell 和文件的无过滤访问，存在安全风险，需谨慎使用。Mac\u002FLinux 需通过 Homebrew 安装 uv；Windows 用户必须在 WSL 环境下运行。支持 Bash 和 Zsh。可选安装 screen 以实现终端会话复用，或安装 VS Code 扩展以在编辑器中附加 AI 使用的终端。","3.12",[101,102,103],"uv","screen (可选，用于多路复用终端)","VS Code 扩展 (可选)",[13,15,26],[106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],"chatgpt","custom-gpt","llm","llm-agent","llm-code","openai","shell","ai-coding","anthropic","claude","mcp","mcp-server","agent","ai-agent","claude-desktop","terminal","2026-03-27T02:49:30.150509","2026-04-06T08:45:29.537581",[125,130,135,140],{"id":126,"question_zh":127,"answer_zh":128,"source_url":129},14400,"如何在 macOS 上配置 wcgw MCP Server 以便在 Claude Desktop 中使用？","如果在 Claude Desktop 中无法检测到 wcgw 工具，请尝试以下步骤：\n1. 清除缓存并重新安装 Claude Desktop 应用。\n2. 检查日志文件 ~\u002FLibrary\u002FLogs\u002FClaude\u002Fmcp.log 是否有输出，或在控制台（Cmd+Opt+Shift+I）查看错误信息。\n3. 尝试使用本地克隆方式配置。首先通过 `brew install uv` 安装 uv，然后克隆仓库，并在 claude_desktop_config.json 中使用以下配置：\n{\n  \"mcpServers\": {\n    \"wcgw\": {\n      \"command\": \"uv\",\n      \"args\": [\"run\", \"--directory\", \"\u002FUsers\u002F你的用户名\u002Frepos\u002Fwcgw\", \"wcgw_mcp\"]\n    }\n  }\n}","https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fissues\u002F55",{"id":131,"question_zh":132,"answer_zh":133,"source_url":134},14401,"GLM-4.6\u002F4.7 等模型在使用 wcgw 时出现 JSON 转义或验证错误怎么办？","这是已知问题，可以通过以下方式解决：\n1. 升级到最新版本 (v5.6.0 及以上)，该版本已修复相关问题。\n2. 或者尝试使用简化了 BashCommand schema 的分支版本进行测试，命令如下：\nuvx --from git+https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw@feat\u002Fflatten-bashcommand wcgw\n维护者正在通过移除 'object' 类型来彻底解决此类模型兼容性问题。","https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fissues\u002F91",{"id":136,"question_zh":137,"answer_zh":138,"source_url":139},14402,"wcgw 是否支持 OpenRouter 或其他非 Anthropic 的 LLM 模型？","wcgw 仓库目前专注于作为 MCP Server 运行，不再直接维护带有 OpenRouter 支持的终端聊天界面（该功能已弃用）。\n要使用 OpenRouter 或其他模型（如 Qwen, Mistral, Ollama 等），建议搭配支持这些模型的 MCP 客户端使用。例如：\n1. 维护者推荐使用其开发的 VS Code 扩展 chat.md，它支持 OpenRouter 并可连接 wcgw MCP Server。\n2. 用户也可以寻找其他支持 MCP 协议且集成 OpenRouter 的第三方终端聊天应用。","https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fissues\u002F36",{"id":141,"question_zh":142,"answer_zh":143,"source_url":144},14403,"在使用较弱模型或非 Claude 模型时，FileWriteOrEdit 工具因字符转义（如 \\n）失败如何处理？","这个问题通常是由于模型对 JSON 格式中的转义字符理解偏差导致的。解决方案包括：\n1. 更改 MCP 客户端配置，将服务器的 JSON 响应转换为类似 XML 的格式再发送给 LLM，这能有效避免转义混淆。\n2. 某些客户端（如 MCP-SuperAssistant）的修改版可以将 ReadFiles 等工具的返回结果以原始 XML 文本格式而非 JSON 格式返回，从而解决问题。\n3. 升级模型版本（例如从 Gemini Pro Preview 05-06 升级到 06-05 或 Flash 05-20）也可能自然解决此问题。","https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fissues\u002F66",[146,151,156,160,165,170,175,180,185,190,195,199,203,208,213,218,223,227,232,237],{"id":147,"version":148,"summary_zh":149,"released_at":150},81174,"5.6.1","## 安全更新\n\n此版本通过更新存在漏洞的依赖项，解决了全部 14 个 Dependabot 安全警告。\n\n### 安全修复\n\n| 包名       | 旧版本   | 新版本   | 修复的漏洞                       |\n|------------|----------|----------|----------------------------------|\n| mcp        | 1.9.2    | 1.26.0   | DNS 重绑定（高危）、拒绝服务漏洞（高危） |\n| filelock   | 3.18.0   | 3.20.3   | TOCTOU 符号链接漏洞（中危）      |\n| starlette  | 0.46.2   | 0.50.0   | 范围头拒绝服务（高危）、多部分拒绝服务（中危） |\n| python-multipart | 0.0.20   | 0.0.22   | 任意文件写入（高危）             |\n| urllib3    | 2.4.0    | 已移除   | 解压缩炸弹绕过（高危）、重定向问题（中危） |\n| requests   | 2.32.3   | 已移除   | .netrc 凭证泄露（中危）          |\n\n### 变更\n- 更新了 `pyproject.toml`，要求 `mcp>=1.23.0`\n- 修复了因升级依赖类型而产生的 mypy 严格模式错误\n- 所有 63 个测试均通过","2026-01-27T07:25:26",{"id":152,"version":153,"summary_zh":154,"released_at":155},81175,"5.6.0","为提高与更多 MCP 客户端的兼容性，对 BashCommand 模式进行了扁平化处理。","2026-01-23T09:46:59",{"id":157,"version":158,"summary_zh":79,"released_at":159},81176,"5.5.6","2026-01-16T17:50:14",{"id":161,"version":162,"summary_zh":163,"released_at":164},81177,"5.5.5","- 在 Bash 命令之前的注释会导致 Bash 输出出现问题。","2025-12-18T09:45:31",{"id":166,"version":167,"summary_zh":168,"released_at":169},81178,"5.5.4","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fcompare\u002F5.5.3...5.5.4","2025-12-13T06:29:47",{"id":171,"version":172,"summary_zh":173,"released_at":174},81179,"5.5.3","- 撤销初始化模式变更\n- 对 Llama 等的线程 ID 进行归一化处理\n","2025-12-04T12:40:39",{"id":176,"version":177,"summary_zh":178,"released_at":179},81180,"5.5.2","## 变更内容\n* 文件编辑功能改进。修复了容易混淆的字符问题。抛出异常……由 @rusiaaman 在 https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fpull\u002F83 中提交\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fcompare\u002F5.5.1...5.5.2","2025-12-02T18:31:55",{"id":181,"version":182,"summary_zh":183,"released_at":184},81181,"5.5.1","- 修复大型指令错误","2025-10-09T11:16:59",{"id":186,"version":187,"summary_zh":188,"released_at":189},81182,"5.5.0","*新功能*\n- 支持后台命令。多个命令可以并行运行，每个命令都在 multiplex 屏幕中执行。\n- 增加对 ZSH 的支持。现在你可以将 shell 配置为 zsh 或 bash。如果你使用 ZSH，系统会自动选择它。\n- Multiplex 功能改进。你现在会看到默认的美观提示符，而不是“wcgw ->”。与正在运行的终端交互的体验现在更加流畅和安全（不再被 LLM 覆盖）。\n- wcgw-vscode 扩展现在会在工作区目录匹配时自动附加到正在运行的 shell 上。","2025-10-06T10:33:36",{"id":191,"version":192,"summary_zh":193,"released_at":194},81183,"5.4.5","**完整更新日志**: https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fcompare\u002F5.4.4...5.4.5","2025-10-05T13:33:41",{"id":196,"version":197,"summary_zh":79,"released_at":198},81184,"5.4.4","2025-09-23T13:00:56",{"id":200,"version":201,"summary_zh":79,"released_at":202},81185,"5.4.3","2025-08-29T13:15:00",{"id":204,"version":205,"summary_zh":206,"released_at":207},81186,"5.4.2","## 变更内容\n- 默认不在析构函数中进行初始化，改用临时目录\n- 其他一些小优化\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fcompare\u002F5.4.1...5.4.2","2025-07-19T06:51:40",{"id":209,"version":210,"summary_zh":211,"released_at":212},81187,"5.4.1","- Prompt changes for multiple blocks per edit call for speed and status check syntax issue.\r\n- Dockerfile fix","2025-06-28T14:47:53",{"id":214,"version":215,"summary_zh":216,"released_at":217},81188,"5.4.0","## Features\r\n- WCGW_SERVER_INSTRUCTIONS environment variable to add a instructions during initialisation at top.\r\n\r\n## Fixes\r\n- BashCommand failing due to Claude desktop update. Simplified the schema.\r\n- \"Screen\" startup would cause fatal failure due to timeout error.\r\n- Percentage to change \u003C=50 but no search replace block. Put a hard check\r\n\r\n## What's Changed\r\n* feat(mcp-server): add customizable server instructions via environment variable by @murich in https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fpull\u002F70\r\n* 5.4.0: claude desktop fix and other improvements by @rusiaaman in https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fpull\u002F72\r\n\r\n## New Contributors\r\n* @murich made their first contribution in https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fpull\u002F70\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fcompare\u002F5.3.2...29ae6ffc7a31389a425514891177ea1caf57738d","2025-06-27T08:16:19",{"id":219,"version":220,"summary_zh":221,"released_at":222},81189,"5.3.2","- Claude uses grep by default even if ripgrep `rg` is available which is much faster, asking LLM to use `rg` (if available)","2025-06-18T17:51:09",{"id":224,"version":225,"summary_zh":79,"released_at":226},81190,"5.3.1","2025-06-17T06:41:15",{"id":228,"version":229,"summary_zh":230,"released_at":231},81191,"5.3.0","- \"~\u002F.wcgw\u002FCLAUDE.md\" if exists is automatically sent as instructions to LLM during init. Create the folder and the file and add prompts that's loaded everytime across projects during Initialisation calls.\r\n- Show line numbers by default in read files. Trading off line number out of sync issue with redundant call to see the line numbers.\r\n- Diff prompt improvement that mentions the order sensitivity of search replace blocks.\r\n\r\n## What's Changed\r\n* Feat\u002Fimprovements by @rusiaaman in https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fpull\u002F68\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fcompare\u002F5.2.0...5.3.0","2025-06-15T11:25:49",{"id":233,"version":234,"summary_zh":235,"released_at":236},81192,"5.2.0","- Should fix reset shell behavior\r\n- Supports `\u003C\u003C\u003C\u003C\u003C SEARCH>` behaviour\r\n- Removes false positive tree sitter warnings.\r\n\r\n## What's Changed\r\n* Update README.md by @jprrabanal in https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fpull\u002F64\r\n\r\n## New Contributors\r\n* @jprrabanal made their first contribution in https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fpull\u002F64\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Frusiaaman\u002Fwcgw\u002Fcompare\u002F5.1.3...5.2.0","2025-06-05T09:29:34",{"id":238,"version":239,"summary_zh":240,"released_at":241},81193,"5.1.3","- Due to some upstream changes in Claude it wasn't using percentage_to_edit before file content, effectively making the parameter useless and causing it to write more than edit. Made the parameters ordered by alphabetical name sorting, and also explicitly mentioning the order.\r\n- Fixed chat id not being shown in case a very large file is read during initialisation. ","2025-05-15T17:37:02"]