Skip to content

v0.5.2 — Optional Windows PATH repair (cloudprice-mcp fix-path)

Choose a tag to compare

@alialbaker alialbaker released this 08 May 19:34
· 38 commits to main since this release

v0.5.2 — Optional Windows PATH repair

A small follow-up to v0.5.1 for Windows users who want the bare cloudprice-mcp command to resolve in PowerShell or cmd. Default flow is unchanged.

What's new

  • cloudprice-mcp fix-path — opt-in command that adds Python's Scripts/ folder to user PATH on Windows.
    • --check — inspect without modifying (exit 1 if not on persistent PATH)
    • --remove — undo a previous fix-path
    • --yes — skip the confirmation prompt
  • cloudprice-mcp doctor reports shell-shim status as a hint, not a failure. New section tells you whether the bare cloudprice-mcp command would resolve in your current shell, with a one-line suggestion (cloudprice-mcp fix-path) when it wouldn't.

Why this is opt-in

The default cloudprice-mcp setup flow doesn't need fix-path — it writes the absolute Python path into every MCP client's config, so Claude Desktop, Copilot, Cursor, etc. launch cloudprice fine regardless of your shell PATH.

fix-path is purely for your own shell ergonomics — if you'd rather type cloudprice-mcp doctor instead of python -m cloudprice_mcp.cli doctor.

How it works (Windows)

  1. Detects the current Python's Scripts folder via sysconfig.get_path('scripts').
  2. Reads HKCU\Environment\Path (the user-persistent PATH on Windows).
  3. Appends the Scripts folder if not already present (preserves the existing PATH).
  4. Broadcasts WM_SETTINGCHANGE so newly-spawned shells pick up the change.

Existing shells don't refresh PATH — that's a Windows limitation. Open a fresh PowerShell window after running fix-path.

macOS / Linux

fix-path is a no-op on non-Windows. The pip bin directory (~/.local/bin or /usr/local/bin) is typically already on PATH, and modifying shell rc files silently is too invasive.

Upgrade

pip install --upgrade cloudprice-mcp

If you previously hit cloudprice-mcp: command not recognized in PowerShell:

python -m cloudprice_mcp.cli fix-path
# Then open a fresh PowerShell window
cloudprice-mcp doctor

Stats

  • 8 files changed (+541 / −8 lines)
  • 124 tests passing (21 new for path_fix module + fix_path_cmd; registry I/O is mocked so tests run identically on all OSes)
  • New modules: path_fix.py, fix_path_cmd.py
  • No new dependencies (stdlib winreg + ctypes only)

Links