spath-cli 0.1.0

A Windows PATH security scanner and fixer - detects and fixes unquoted paths with spaces
docs.rs failed to build spath-cli-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

spath

spath banner

Languages: Русский | 日本語

Windows PATH security scanner and optimizer.

Problem

Windows PATH entries with spaces but without quotes create security vulnerabilities that can be exploited for privilege escalation attacks.

Solution

spath detects and fixes these vulnerabilities automatically.

Installation

Download (easiest)

Download from GitHub Releases:

  • spath-setup.exe — Installer (adds to PATH automatically)
  • spath.exe — Standalone executable
  • spath-windows-x64.zip — Archive with docs

From crates.io

cargo install spath-cli

From source

cargo build --release

Binary location: target/release/spath.exe

Commands

Scan

Analyze PATH for security issues.

spath scan

spath scan --verbose

spath scan --audit

Fix

Fix USER PATH issues (no admin required).

spath fix --dry-run

spath fix

spath fix --delicate

Analyze

Analyze both SYSTEM and USER PATH.

spath analyze

Clean

Remove duplicate paths and optimize PATH.

spath clean --dry-run

spath clean

spath clean --system

spath clean --delicate

Backup Management

spath backup

spath list-backups

spath restore <backup-file>
spath restore <backup-file> --delicate

Issue Types

CRITICAL: Unquoted paths with spaces - security vulnerability

WARNING: Non-existent paths or relative paths

INFO: Informational messages

Workflow

  1. Scan: spath scan --audit
  2. Analyze: spath analyze
  3. Backup: spath backup
  4. Fix USER PATH: spath fix
  5. Remove duplicates: spath clean
  6. If needed, restore: spath restore <backup-file>

Requirements

  • Windows 10 or later
  • Rust 1.70+ (for building from source)

Options

  • --dry-run or -d - Preview changes without applying
  • --delicate - Ask for confirmation before applying changes
  • --system or -s - Include SYSTEM PATH operations (requires admin)
  • --verbose or -v - Show detailed information
  • --audit or -a - Show detailed audit report

Notes

  • USER PATH changes do not require administrator rights
  • SYSTEM PATH changes require administrator rights
  • Automatic backup before any changes
  • Restart applications to apply PATH changes
  • Use --delicate for extra safety with confirmation prompts

License

MIT License - see the LICENSE file for details