Metadata-Version: 2.5
Name: win-dev-doctor
Version: 0.2.0
Summary: Fast, modular CLI & MCP doctor for Windows developers — diagnose PATH, kill stuck ports, check dev config, and reclaim cache space.
Project-URL: Homepage, https://github.com/reillywalter/win-dev-doctor
Project-URL: Repository, https://github.com/reillywalter/win-dev-doctor
Project-URL: Issues, https://github.com/reillywalter/win-dev-doctor/issues
Author: Reilly Walter
License: MIT
License-File: LICENSE
Keywords: cache,claude,cli,developer-tools,diagnostics,doctor,mcp,path,ports,windows
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Microsoft :: Windows
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Requires-Dist: psutil>=6.0.0
Requires-Dist: rich>=13.7.0
Requires-Dist: typer>=0.12.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.6.0; extra == 'dev'
Description-Content-Type: text/markdown

# win-dev-doctor (`wdd`)

> Fast, modular **CLI & MCP doctor** for Windows developers — audit `PATH`, kill stuck ports, inspect Windows dev config, reclaim gigabytes of cache space, and connect straight to **Claude Code / Cursor / Antigravity** via MCP.

[![CI](https://github.com/reillywalter/win-dev-doctor/actions/workflows/ci.yml/badge.svg)](https://github.com/reillywalter/win-dev-doctor/actions/workflows/ci.yml)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
[![MCP Ready](https://img.shields.io/badge/MCP-stdio%20server-38bdf8.svg)](#mcp-server-for-claude-code--cursor)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE)

![win-dev-doctor terminal demo](assets/demo.svg)

## Why?

Developing on Windows comes with recurring friction:
- *"Port 3000 is already in use"* -> hunting PIDs with `netstat -ano | findstr` + Task Manager.
- Broken, duplicated, or shadowed `python.exe` / `node.exe` entries in `PATH`.
- `MAX_PATH` (260-char) crashes in `git`, `cargo`, `pip`, or `node_modules`.
- Symlink errors because Developer Mode is off.
- Slow builds because Windows Defender scans `repos/` and `.cargo/`.
- Gigabytes silently buried in `pip`, `uv`, `npm`, `pnpm`, `cargo`, and `gradle` caches.

**`wdd`** catches and fixes all of them from one tiny CLI — and exposes the same diagnostics as an **MCP server** so your AI coding agent can troubleshoot Windows for you.

## Install

```powershell
# With uv (recommended)
uv tool install git+https://github.com/reillywalter/win-dev-doctor

# Or clone & run locally
git clone https://github.com/reillywalter/win-dev-doctor.git
cd win-dev-doctor
uv sync
```

## Usage

### Run all health checks
```powershell
wdd check
wdd check --verbose
wdd check --only path,env,long-paths,git
wdd check --json
```

### Generate a shareable Markdown report (auto-redacts username)
```powershell
wdd report -o doctor-report.md
```

### Inspect & kill stuck ports
```powershell
wdd ports              # Common dev ports (3000, 5173, 8000, 8080, ...)
wdd ports --all        # Every listening TCP port
wdd kill 3000          # Gracefully terminate whatever owns port 3000
wdd kill 3000 -f -y    # Force-kill without prompt
```

### Audit your Windows `PATH`
```powershell
wdd path               # Missing dirs, duplicates, shadowed binaries
wdd path --all         # Full resolution order
```

### Reclaim developer cache space
```powershell
wdd clean --dry-run    # Preview pip, uv, npm, pnpm, yarn, cargo, ruff, gradle, nuget
wdd clean              # Interactive cleanup
wdd clean -t pip,uv -y # Clean specific caches immediately
```

## MCP Server (for Claude Code / Cursor)

Run `wdd mcp` to start a zero-dependency stdio MCP server exposing `run_health_check`, `inspect_path`, `list_ports`, `kill_port`, `scan_caches`, and `clean_caches`.

Add to your MCP config (`claude_desktop_config.json`, `.mcp.json`, or Cursor MCP settings):

```json
{
  "mcpServers": {
    "win-dev-doctor": {
      "command": "wdd",
      "args": ["mcp"]
    }
  }
}
```

## Built-in Checks

| ID | Category | What it checks |
|---|---|---|
| `path` | environment | Missing folders, duplicate entries, shadowed dev binaries in `PATH` |
| `env` | environment | `TEMP`/`TMP` validity, global `PYTHONHOME`/`PYTHONPATH` leaks, active proxies |
| `long-paths` | windows | `LongPathsEnabled` registry flag (`>260` char paths) |
| `symlinks` | windows | Developer Mode & non-admin symlink creation |
| `tools` | toolchain | Installed versions of `git`, `python`, `uv`, `node`, `rustc`, `go`, `docker`, `winget`, `pwsh` |
| `git` | toolchain | Global identity, `core.longpaths`, `core.autocrlf` |
| `wsl` | windows | WSL availability and installed Linux distros |
| `ports` | runtime | Active processes occupying common local dev ports |
| `caches` | disk | Reclaimable disk space across package manager caches |
| `defender` | performance | Windows Defender exclusions for common dev folders |

## Contributing (1 File = 1 Check)

Want to add a check for MSVC Build Tools, Docker/WSL2 memory limits, OpenSSH Agent, Scoop, or VS Code?

Drop a single file in `src/win_dev_doctor/checks/` subclassing `BaseCheck` — the registry discovers it automatically. Check open [`good first issue`](https://github.com/reillywalter/win-dev-doctor/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) tickets and [CONTRIBUTING.md](CONTRIBUTING.md).

## License

[MIT](LICENSE)
