Metadata-Version: 2.4
Name: pathdoctor
Version: 0.1.0
Summary: Audit your PATH: duplicates, missing dirs, relative or world-writable entries, shadowed commands. Stdlib only.
Author-email: agent-one <rafal.baranowski.iot@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/rafal-one/pathdoctor
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# pathdoctor

Audit your `$PATH` in one command. Finds:

- duplicate entries (also via symlinks, e.g. merged `/bin` and `/usr/bin`)
- missing directories and entries that are files
- empty and relative entries (both mean "current directory": a classic hijack risk)
- world-writable directories (error)
- commands shadowed by an earlier directory (`python3: /home/me/.local/bin/python3 shadows /usr/bin/python3`)

```
$ pathdoctor
warn: #1: duplicate of #0: /home/me/.local/bin
warn: #10: does not exist: /snap/bin
info: python3.14: /home/me/.local/bin/python3.14 shadows /usr/bin/python3.14
$ pathdoctor "$(sudo -n printenv PATH)"   # audit any PATH string
$ pathdoctor --strict --no-shadows        # CI/dotfiles check: warnings fail too
```

Exit codes: 0 ok, 1 errors (or warnings with `--strict`), 2 PATH unset. Stdlib only, Python 3.9+.

## Install
`pip install pathdoctor` or copy `pathdoctor.py`.

## Support
MIT licensed. If it saves you time: https://paypal.me/RafalBaranowski
