{"id":23459561,"url":"https://github.com/d-led/pathdebug","last_synced_at":"2025-04-14T04:15:09.330Z","repository":{"id":142544797,"uuid":"613558425","full_name":"d-led/pathdebug","owner":"d-led","description":"debug path list environment variables","archived":false,"fork":false,"pushed_at":"2025-03-04T19:40:52.000Z","size":179,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T04:15:00.192Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/d-led.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-13T20:06:43.000Z","updated_at":"2025-03-30T05:13:44.000Z","dependencies_parsed_at":"2024-02-04T20:00:30.054Z","dependency_job_id":"2d9665f2-3796-428e-a219-6abf73dae263","html_url":"https://github.com/d-led/pathdebug","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fpathdebug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fpathdebug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fpathdebug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/d-led%2Fpathdebug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/d-led","download_url":"https://codeload.github.com/d-led/pathdebug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248819408,"owners_count":21166477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-24T06:15:41.532Z","updated_at":"2025-04-14T04:15:09.308Z","avatar_url":"https://github.com/d-led.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pathdebug\n\na simple interactive \u0026 one-shot tool to debug path list environment variables\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/d-led/pathdebug)](https://goreportcard.com/report/github.com/d-led/pathdebug)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fd-led%2Fpathdebug.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fd-led%2Fpathdebug?ref=badge_shield)\n[![Test](https://github.com/d-led/pathdebug/actions/workflows/test.yml/badge.svg)](https://github.com/d-led/pathdebug/actions/workflows/test.yml)\n[![CodeQL](https://github.com/d-led/pathdebug/actions/workflows/codeql.yml/badge.svg)](https://github.com/d-led/pathdebug/actions/workflows/codeql.yml)\n\n```bash\npathdebug {EnvironmentVariableName}\n```\n\n## Features\n\n- detect duplicate expanded path entries\n- detecting non-existent paths and files\n- best effort of **finding out where the path is set**\n  - [known startup script locations](common/known_paths.go), such as `.bashrc`\n  - `/etc/path.d` path lists\n  - recursive follow-ups of `source $file`-like statements in the above scripts\n- interactive mode\n- noninteractive formatted output\n\n## Install\n\n### Homebrew\n\n```bash\nbrew tap d-led/d-led\nbrew install pathdebug\n```\n\n### Chocolatey\n\n```shell\nchoco install pathdebug\n```\n\nsee package at [Chocolatey](https://community.chocolatey.org/packages/pathdebug)\n\n### From Source\n\n```bash\ngo install\n```\n\nfrom github:\n\n```bash\ngo install github.com/d-led/pathdebug@latest\n```\n\nAlternatively, download the binary from [Github releases](https://github.com/d-led/pathdebug/releases/).\n\nOn OSX you might need to run `sudo xattr -d com.apple.quarantine pathdebug` on the downloaded binary.\n\n### Download Latest Release\n\nOSX:\n\n```bash\ncurl -s -L https://github.com/d-led/pathdebug/releases/latest/download/pathdebug_Darwin_all.tar.gz | tar xvz - pathdebug\n```\n\nLinux: same procedure, but substitute the artifact name with the appropriate one.\n\n## Usage\n\nhelp:\n\n```bash\npathdebug --help\n```\n\n### Interactive\n\n```bash\nexport SOME_PATH='/sbin:~/.bashrc:/a:/b:/a:/c:/d:/e:/f:/g'\npathdebug SOME_PATH\n```\n\n\u0026darr;\n\n```text\ntap Esc/q/Ctrl-C to quit, \u003c-/-\u003e to paginate\n+---+--------+-----+-----------+\n| # | DUP[#] | BAD | PATH      |\n+---+--------+-----+-----------+\n| 1 |        |     | /sbin     |\n| 2 |        | F   | ~/.bashrc |\n| 3 | 5      | X   | /a        |\n| 4 |        | X   | /b        |\n| 5 | 3      | X   | /a        |\n| 6 |        | X   | /c        |\n+---+--------+-----+-----------+\n  •○\n```\n\nand for the path variable with source detection:\n\n```text\n+---+--------+-----+----------------------------------+-----------------+\n| # | DUP[#] | BAD | PATH                             | ±SOURCES        |\n+---+--------+-----+----------------------------------+-----------------+\n| 1 |        |     | /Users/d/.opam/default/bin       |                 |\n| 2 |        |     | /Users/d/.local/share/ponyup/bin | ~/.zshrc        |\n| 3 |        |     | /usr/local/sbin                  | ~/.zshrc        |\n| 4 |        |     | /opt/homebrew/bin                | ~/.bash_profile |\n| 5 |        |     | /opt/homebrew/sbin               |                 |\n+---+--------+-----+----------------------------------+-----------------+\n  •○○○○○\n```\n\n### Direct Output\n\n```bash\npathdebug PATH -o table\n```\n\nsee help for other formats\n\n## Limitations\n\n- finding the sources where the `PATH` variable entries are set is best-effort, and is done only for the `PATH` environment variable at present\n- path set by executables currently not tracked as sources\n- CSV output may lag in output completeness\n\n## License\n\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fd-led%2Fpathdebug.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fd-led%2Fpathdebug?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-led%2Fpathdebug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fd-led%2Fpathdebug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fd-led%2Fpathdebug/lists"}