dsh-windows-c-cleanup
Windows system-drive (C:) cleanup for DSH: rule-based scan, five-tier safety grading, a staging area with a rollback ledger, UAC elevation, and migration to another drive — a model tool plus a Web GUI panel.
Install
dsh plugin --profile web add dsh-windows-c-cleanup
Sandbox test results
| Stage | Result |
|---|---|
| 1 install | ✓ |
| 2 list | ✓ |
| 3 mount | ✓ |
| 4 boot | — |
Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).
README
dsh-windows-c-cleanup
English | [中文](README.md)
Repository: <https://github.com/runcat-tommy/dsh-windows-c-cleanup> (npm: dsh-windows-c-cleanup)
A DeepSeek Harness (DSH) plugin that adds Windows system-drive (C:) cleanup as an auditable pipeline:
Scan → five-tier grading → visual report → user selection → tiered execution / migration to another drive
Why
A full C: drive is rarely caused by "junk files". It is usually caused by things that belong on another drive: package-manager caches, IDE indexes, on-device browser AI models, leftover installers, virtual disks.
Deleting those blindly is risky: rebuilding an IDE index takes hours, and removing a virtual disk destroys an entire Linux environment. This plugin instead:
1. Measures before deleting — every candidate is sized against an externalized rule library, and a visual Markdown report is produced first;
2. Grades into five tiers — each candidate carries a human-readable reason;
3. Treats the protection list as a hard constraint — anything not in the rule library is treated as protected ("unknown means don't delete");
4. Prefers migration over deletion — with a second drive present, caches are moved via junctions or app config so they never come back.
Five tiers
Tier · Meaning · Execution policy
🟢 Safe to delete · Caches, temp files, leftover installers — no data loss · Batch after a single confirmation
🟡 Delete with care · Rebuildable but expensive (IDE indexes, on-device AI models, package repos), or admin-only (WinSxS via DISM) · Confirm per item
🟠 Consider migrating · Moves to another drive transparently via junction or app config · Migrate + link + ledger, rollback supported
🔴 Protected · User documents, credentials, chat data, virtual disks, IDE config, unknown paths · Never deleted automatically (hard constraint, not overridable by user rules)
🔵 Long-term prevention · Config actions: cache redirection, Storage Sense, virtual-disk location audit · Do once, clean less forever
Install
dsh plugin is a thin pnpm forwarder: it installs the package into the named profile and then registers it in dsh.profile.bundles based on the actual installed state (this package declares dsh.bundle.patch, so it joins the layer stack). Pick any of the three routes below — all of them require a DSH restart to take effect.
Option 1: install straight from GitHub
dsh plugin --profile web add github:runcat-tommy/dsh-windows-c-cleanup
- Best for: grabbing the newest commit on the repo when you already have git installed.
- Note:
lib/andclient/client.jsare build artifacts and are not committed (they are produced by thepreparescript), so this route runs a build and asks for your approval;dsh pluginprints the approval prompt. - Updating: run the same command again (pnpm re-fetches the latest commit of that git source).
Option 2: download from GitHub, then install from the local folder
# Step 1: get the code (git clone, or Code → Download ZIP and unzip) git clone https://github.com/runcat-tommy/dsh-windows-c-cleanup.git D:\dsh-plugins\dsh-windows-c-cleanup # Step 2: install from the local folder dsh plugin --profile web add D:\dsh-plugins\dsh-windows-c-cleanup
- Best for: reading the code before installing, making your own changes, or when the network is unreliable (download the ZIP instead of using git).
- Note: a local folder is installed as a
link:, so your edits apply immediately — host-side changes need adsh webrestart; client-only UI changes neednpm run build:clientplus a page refresh. - Updating:
git pullin that folder, runnpm run build, then restartdsh web.
Option 3: install from npm (recommended)
dsh plugin --profile web add dsh-windows-c-cleanup # pin a version when you want to dsh plugin --profile web add dsh-windows-c-cleanup@1.0.5
- Best for: everyday use, and the least effort. The npm package already ships the build artifacts, so no local compiler, no git and no build approval are involved.
- Updating:
dsh plugin --profile web up dsh-windows-c-cleanup - Uninstalling (same for all three routes):
dsh plugin --profile web remove dsh-windows-c-cleanup - Listing what is installed:
dsh plugin --profile web list
Which route?
· Command · What it needs · What you get · Updating
1. Straight from GitHub · add github:runcat-tommy/dsh-windows-c-cleanup · git installed; one build approval · the newest commit (built at install time) · run the same command again
2. Download to a folder · add D:\dsh-plugins\dsh-windows-c-cleanup · nothing (a ZIP works too) · the local folder (link:, edits apply at once) · git pull + npm run build + restart
3. npm · add dsh-windows-c-cleanup · nothing · the published release (artifacts included) · up dsh-windows-c-cleanup
In one line: npm is the least effort, GitHub-straight is the quickest (but needs a build approval), local-folder is the most flexible (edits show up immediately).
Compatible DSH versions
The plugin declares its host requirement in peerDependencies:
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.1.1-rc.1 || ^0.2.0-rc.1 || ^0.2.1-alpha.1"
That covers the DSH prerelease lines from 0.1.0-rc.6 through 0.2.1-rc.2 (including 0.1.1-rc.x, 0.2.0-rc.x and 0.2.1-alpha/rc). Under strict semver a prerelease is only accepted when the range has a branch starting at a prerelease of the same major.minor.patch, which is why a bare * matches no prerelease at all. Host version tested: 0.2.1-rc.2 (npm run typecheck / build / smoke / m2 / m5 / market:check all pass).
Restart after installing
All three routes ar
…(truncated)
Rendered from the README published on npm. Formatted only, not edited.
Versions
Published on npm::7,最后更新 2026-10-21