{"id":51169773,"url":"https://github.com/1837620622/devin-tools","last_synced_at":"2026-06-26T23:30:24.156Z","repository":{"id":337424295,"uuid":"1145893616","full_name":"1837620622/devin-tools","owner":"1837620622","description":"devin + macOS 系统清理 + AI 工具缓存优化 + Windsurf/Codex/Chrome/QQ/微信/Telegram 缓存清理","archived":false,"fork":false,"pushed_at":"2026-06-18T02:35:28.000Z","size":696,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T04:18:12.314Z","etag":null,"topics":["ai-tools","cache-cleaner","chrome","cleanup","codex","devin","disk-space","junk-cleaner","mac-cleaner","macos","mcp","performance","qq","safe-cleanup","shell-script","system-optimization","telegram","wechat","windsurf"],"latest_commit_sha":null,"homepage":"https://github.com/1837620622/devin","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/1837620622.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-30T10:53:20.000Z","updated_at":"2026-06-18T02:37:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/1837620622/devin-tools","commit_stats":null,"previous_names":["1837620622/windsurf-fix-tool","1837620622/devin-tools"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/1837620622/devin-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1837620622%2Fdevin-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1837620622%2Fdevin-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1837620622%2Fdevin-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1837620622%2Fdevin-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/1837620622","download_url":"https://codeload.github.com/1837620622/devin-tools/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/1837620622%2Fdevin-tools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34835785,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai-tools","cache-cleaner","chrome","cleanup","codex","devin","disk-space","junk-cleaner","mac-cleaner","macos","mcp","performance","qq","safe-cleanup","shell-script","system-optimization","telegram","wechat","windsurf"],"created_at":"2026-06-26T23:30:23.609Z","updated_at":"2026-06-26T23:30:24.150Z","avatar_url":"https://github.com/1837620622.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Windsurf Fix Tool\n\n![Platform](https://img.shields.io/badge/Platform-macOS%20%7C%20Linux%20%7C%20Windows-blue?style=for-the-badge)\n![Shell](https://img.shields.io/badge/Shell-Bash%20%7C%20PowerShell-green?style=for-the-badge)\n![License](https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge)\n\nA cross-platform troubleshooting toolkit for Windsurf IDE, focused on startup\nlag, shell issues, MCP loading failures, oversized runtime caches, and AI tool\ncleanup.\n\n[中文](./README.md) | [English](./README.en.md)\n\n## What This Repository Focuses On\n\n- Safe cleanup first: fix lag without forcing sign-in again.\n- Separate scripts for macOS, Linux, and Windows.\n- Clear risk boundaries for chat history, login state, extensions, and MCP config.\n- Practical remediation for terminal issues, MCP diagnostics, and system cache\n  cleanup.\n\n## Verified Cleanup Boundaries\n\nThe current guidance is based on local inspection, Windsurf troubleshooting\ndocs, Electron storage behavior, and official PowerShell encoding guidance.\n\n- Best first target for lag:\n  `CachedData`\n  This is the highest-value rebuildable runtime cache.\n- Secondary runtime caches:\n  `Cache`, `GPUCache`, `Code Cache`, `Dawn*Cache`, and `logs`\n  These are usually safe to rebuild.\n- Extension package cache:\n  `CachedExtensionVSIXs`\n  Safe by default and does not uninstall installed extensions.\n- Local backup state:\n  `User/globalStorage/state.vscdb.backup`\n  Usually safe, but it removes local backup state.\n- Login or session related stores:\n  `IndexedDB`, `WebStorage`, `Local Storage`, `Session Storage`,\n  `Service Worker`\n  Avoid these by default because they are closer to persistent site data.\n- Cascade history:\n  `~/.codeium/windsurf/cascade`\n  Avoid by default because it removes local Cascade history.\n- MCP config:\n  `~/.codeium/windsurf/mcp_config.json`\n  Reset only when MCP config itself is broken.\n\n## Feature Matrix\n\n- macOS:\n  `fix-windsurf-mac.sh`\n  Includes startup cache cleanup, deep runtime cleanup, MCP diagnostics,\n  terminal fixes, ID reset, AI tool cleanup, conversation archiving, and\n  long-chat lag diagnosis.\n- Linux:\n  `fix-windsurf-linux.sh`\n  Includes startup cache cleanup, `chrome-sandbox` repair, systemd OSC\n  troubleshooting, MCP diagnostics, and ID reset.\n- Windows:\n  `fix-windsurf-win.ps1`\n  Includes startup cache cleanup, execution policy repair, update and network\n  checks, deep runtime cleanup, and ID reset.\n- macOS system cleanup:\n  `macos-safe-cleanup.sh`\n  Handles risk-tiered cleanup for system caches, dev-tool caches, Windsurf\n  runtime caches, and common app caches.\n\n## Repository Layout\n\n| File | Purpose |\n| --- | --- |\n| `fix-windsurf-mac.sh` | Main macOS repair script |\n| `fix-windsurf-linux.sh` | Main Linux repair script |\n| `fix-windsurf-win.ps1` | Main Windows repair script |\n| `fix-windsurf-win.bat` | Windows launcher for the PowerShell version |\n| `macos-safe-cleanup.sh` | macOS system and developer cache cleanup script |\n| `WINDSURF-CLEANING-GUIDE.md` | Guide for cleanup, lag, and device-ID modes |\n| `README.md` | Chinese documentation |\n| `README.en.md` | English documentation |\n\n## Quick Start\n\n### macOS Launch\n\n```bash\ngit clone https://github.com/1837620622/devin-tools.git\ncd devin\nchmod +x fix-windsurf-mac.sh\n./fix-windsurf-mac.sh\n```\n\n### Linux Launch\n\n```bash\ngit clone https://github.com/1837620622/devin-tools.git\ncd devin\nchmod +x fix-windsurf-linux.sh\n./fix-windsurf-linux.sh\n```\n\n### Windows Launch\n\n```powershell\ngit clone https://github.com/1837620622/devin-tools.git\ncd devin\nSet-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser\n.\\fix-windsurf-win.ps1\n```\n\n`fix-windsurf-win.ps1` is stored as `UTF-8 with BOM` for compatibility with\nWindows PowerShell 5.1 when Chinese text is present. `GBK` is not recommended\nbecause it depends on the local system code page and is less reliable across\nGitHub, VS Code, and cross-platform environments.\n\n### macOS System Cleanup\n\n```bash\ngit clone https://github.com/1837620622/devin-tools.git\ncd devin\nchmod +x macos-safe-cleanup.sh\n./macos-safe-cleanup.sh\n```\n\n## Recommended Cleanup Order\n\n1. Start with the built-in startup cache cleanup and target `CachedData` first.\n2. If lag remains, also clean `Cache`, `GPUCache`, `Code Cache`,\n   `DawnWebGPUCache`, `DawnGraphiteCache`, and old logs.\n3. Clean `CachedExtensionVSIXs` only when extension package cache is suspected.\n4. Use deep runtime cleanup when you want a stronger reset without touching chat\n   history or login-related storage.\n   On macOS, option `18` now performs a safe deep cleanup first, then asks\n   whether to continue with risky session stores such as `IndexedDB`,\n   `WebStorage`, and `Cookies`.\n5. Treat `cascade` cleanup as a last resort for severe startup failures.\n\nIf you are specifically working on long-chat lag, also read the\n[Windsurf cleaning guide](./WINDSURF-CLEANING-GUIDE.md).\n\n## Runtime Modes\n\nThe main scripts now support two modes:\n\n- Forced reset mode:\n  cleanup followed by automatic reset of `installation_id`, `machineid`, and\n  telemetry identifiers.\n- Conservative mode:\n  cleanup without automatic device-ID reset, which is better when you want to\n  preserve the current login state as much as possible.\n\nExamples:\n\n```bash\nFORCE_RESET_ID=0 bash fix-windsurf-mac.sh\nFORCE_RESET_ID=0 bash fix-windsurf-linux.sh\n```\n\n```powershell\n$env:FORCE_RESET_ID=\"0\"\n.\\fix-windsurf-win.ps1\n```\n\nBoth modes keep `cascade/*.pb` conversation history. The difference is whether\ndevice identifiers are reset after cleanup.\n\n## Manual Cleanup Commands\n\n### macOS\n\n```bash\nrm -rf ~/Library/Application\\ Support/Windsurf/CachedData\nrm -rf ~/Library/Application\\ Support/Windsurf/Cache\nrm -rf ~/Library/Application\\ Support/Windsurf/GPUCache\nrm -rf ~/Library/Application\\ Support/Windsurf/Code\\ Cache\nrm -rf ~/Library/Application\\ Support/Windsurf/DawnWebGPUCache\nrm -rf ~/Library/Application\\ Support/Windsurf/DawnGraphiteCache\nrm -rf ~/Library/Application\\ Support/Windsurf/CachedExtensionVSIXs\n```\n\n### Linux\n\n```bash\nrm -rf ~/.config/Windsurf/CachedData\nrm -rf ~/.config/Windsurf/Cache\nrm -rf ~/.config/Windsurf/GPUCache\nrm -rf ~/.config/Windsurf/Code\\ Cache\nrm -rf ~/.config/Windsurf/DawnWebGPUCache\nrm -rf ~/.config/Windsurf/DawnGraphiteCache\nrm -rf ~/.config/Windsurf/CachedExtensionVSIXs\n```\n\n### Windows\n\n```powershell\nRemove-Item -Recurse -Force \"$env:APPDATA\\Windsurf\\CachedData\"\nRemove-Item -Recurse -Force \"$env:APPDATA\\Windsurf\\Cache\"\nRemove-Item -Recurse -Force \"$env:APPDATA\\Windsurf\\GPUCache\"\nRemove-Item -Recurse -Force \"$env:APPDATA\\Windsurf\\Code Cache\"\nRemove-Item -Recurse -Force \"$env:APPDATA\\Windsurf\\DawnWebGPUCache\"\nRemove-Item -Recurse -Force \"$env:APPDATA\\Windsurf\\DawnGraphiteCache\"\nRemove-Item -Recurse -Force \"$env:APPDATA\\Windsurf\\CachedExtensionVSIXs\"\n```\n\n## Folders To Avoid Cleaning By Default\n\n- `IndexedDB`\n- `WebStorage`\n- `Local Storage`\n- `Session Storage`\n- `Service Worker`\n\nThese locations are closer to persistent site and session data in Electron, so\ncleaning them may require signing in again for embedded Windsurf services.\n\n## Common Issues\n\n### 1. Startup lag\n\nStart with `CachedData`, then move to `Cache`, `GPUCache`, `Code Cache`,\n`Dawn*Cache`, and old logs.\n\n### 2. Will this delete Cascade history\n\nNo. Startup cache cleanup, extension cache cleanup, and deep runtime cleanup do\nnot touch `~/.codeium/windsurf/cascade`. Only the explicit Cascade cleanup\noption removes it.\n\n### 3. Will this uninstall extensions\n\nNo. The default cleanup only removes `CachedExtensionVSIXs`, which is an\ninstaller cache, not the installed extension itself.\n\n### 4. MCP does not auto-load\n\nCheck:\n\n1. Whether `~/.codeium/windsurf/mcp_config.json` is valid JSON.\n2. Whether Node.js, Python, and `npx` are installed.\n3. Whether required environment variables are present.\n4. Whether Windsurf logs show MCP launch errors.\n\n### 5. Terminal session gets stuck\n\nCommon causes include heavy `zsh` themes, `Oh My Zsh`, `Powerlevel10k`, or\nLinux systemd OSC terminal context tracking.\n\n### 6. “Windsurf is damaged” on macOS\n\nMake sure the app is in `/Applications`, matches your chip architecture, then\nrun:\n\n```bash\nxattr -c \"/Applications/Windsurf.app/\"\n```\n\n### 7. Silent crash on Linux\n\nThis often comes from broken `chrome-sandbox` permissions:\n\n```bash\nsudo chown root:root /path/to/windsurf/chrome-sandbox\nsudo chmod 4755 /path/to/windsurf/chrome-sandbox\n```\n\n### 8. Chinese output is garbled on Windows\n\nThe PowerShell script is stored as `UTF-8 with BOM` and sets both input and\noutput encoding to UTF-8 at runtime. Reverting to `GBK` is not recommended.\n\n## macOS System Cleanup Script\n\n`macos-safe-cleanup.sh` is better suited for system-wide and developer-cache\ncleanup. Its current behavior is:\n\n- It cleans Windsurf `CachedData`, `Cache`, `GPUCache`, `Code Cache`, and\n  `Dawn*Cache` by default.\n- It only displays the risk of `WebStorage` and keeps it by default.\n- It cleans `~/Library/Logs`, `~/Library/Caches`, and selected rebuildable\n  hidden caches under `~/.cache`, such as `codex-runtimes`, `uv`, `selenium`,\n  `vscode-ripgrep`, and `WebDriver Manager`.\n- It also targets Chrome component caches, speech model caches, shader caches,\n  and Crashpad caches.\n- It also targets Choice `temp`, `logs`, and `crash` directories.\n- It also targets MathWorks `ServiceHost/logs` and\n  `MATLAB/local_cluster_jobs`.\n- It performs targeted cleanup for stale `/private/var/folders` items such as\n  temporary clones, joblib memmaps, `node-gyp-tmp`, and `node-compile-cache`,\n  while skipping recent active directories.\n- These targeted `/private` items are now cleaned silently by default, showing\n  only the count and total size instead of printing internal file details.\n- It supports cleanup for Homebrew, npm, pip, Maven, Playwright, Telegram,\n  WeChat, and other large cache locations.\n- Section dividers were changed to ASCII to reduce display garbling in some\n  terminals.\n- Every step is confirmed interactively.\n\n## Important Paths\n\n- Conversation history:\n  macOS / Linux use `~/.codeium/windsurf/cascade`;\n  Windows uses `%USERPROFILE%\\.codeium\\windsurf\\cascade`.\n- MCP config:\n  macOS / Linux use `~/.codeium/windsurf/mcp_config.json`;\n  Windows uses `%USERPROFILE%\\.codeium\\windsurf\\mcp_config.json`.\n- macOS runtime cache:\n  `~/Library/Application Support/Windsurf`\n- Linux runtime cache:\n  `~/.config/Windsurf`\n- Windows runtime cache:\n  `%APPDATA%\\Windsurf`\n\n## Network Whitelist\n\nIf you are behind a firewall, VPN, proxy, or enterprise network policy, make\nsure these domains are reachable:\n\n- `*.codeium.com`\n- `*.windsurf.com`\n- `*.codeiumdata.com`\n\n## References\n\n- [Official Windsurf Troubleshooting](https://docs.windsurf.com/troubleshooting/windsurf-common-issues)\n- [Windsurf Terminal Documentation](https://docs.windsurf.com/windsurf/terminal)\n- [Windsurf MCP Documentation](https://docs.windsurf.com/windsurf/cascade/mcp)\n- [PowerShell File Encoding Guidance](https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/vscode/understanding-file-encoding?view=powershell-7.5)\n- [Windsurf cleaning guide](./WINDSURF-CLEANING-GUIDE.md)\n\n## Author\n\n- WeChat: `1837620622` (传康Kk)\n- Email: `2040168455@qq.com`\n- Xianyu / Bilibili: `万能程序员`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1837620622%2Fdevin-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F1837620622%2Fdevin-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F1837620622%2Fdevin-tools/lists"}