{"id":28789562,"url":"https://github.com/jrhawley/pad-path","last_synced_at":"2025-08-08T17:38:09.947Z","repository":{"id":57651944,"uuid":"312885148","full_name":"jrhawley/pad-path","owner":"jrhawley","description":"Intuitively modify your `$PATH`","archived":false,"fork":false,"pushed_at":"2023-11-28T21:43:27.000Z","size":452,"stargazers_count":7,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-06T16:05:29.611Z","etag":null,"topics":["cli","command-line-tool","environment-variables","path"],"latest_commit_sha":null,"homepage":"https://jrhawley.ca/2020/11/16/pad-path","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jrhawley.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2020-11-14T19:15:34.000Z","updated_at":"2024-11-09T04:08:51.000Z","dependencies_parsed_at":"2023-10-17T05:01:25.177Z","dependency_job_id":"bf418b64-f725-4007-882e-cc45e134c153","html_url":"https://github.com/jrhawley/pad-path","commit_stats":{"total_commits":178,"total_committers":4,"mean_commits":44.5,"dds":0.4887640449438202,"last_synced_commit":"d5c27bc1729ee116674dadd56888bf7d7005edba"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/jrhawley/pad-path","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrhawley%2Fpad-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrhawley%2Fpad-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrhawley%2Fpad-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrhawley%2Fpad-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jrhawley","download_url":"https://codeload.github.com/jrhawley/pad-path/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jrhawley%2Fpad-path/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260447711,"owners_count":23010553,"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":["cli","command-line-tool","environment-variables","path"],"created_at":"2025-06-17T22:11:03.493Z","updated_at":"2025-07-05T12:38:11.356Z","avatar_url":"https://github.com/jrhawley.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pad-path\n\nIntuitively modify your `$PATH`.\n\n![Crates.io](https://img.shields.io/crates/v/pad-path)\n\n## Installation\n\n### Windows (via Scoop)\n\n```shell\n# add the bucket containing pad-path's manifest\nscoop bucket add jrhawley https://gitlab.com/jrhawley/scoop-bucket\n\n# install\nscoop install pad-path\n```\n\n### Nix\n\n```shell\nnix profile install gitlab:jrhawley/pad-path\n```\n\n### Build from source (via Cargo)\n\n```shell\n# directly from crates.io\ncargo install pad-path\n\n# or, equivalently, after downloading the code repo\ngit clone https://gitlab.com/jrhawley/pad-path\ncd pad-path\ncargo install --path .\n```\n\n## Usage\n\n```shell\nIntuitively modify your `$PATH`\n\nUSAGE:\n    pad [SUBCOMMAND]\n\nFLAGS:\n    -h, --help       Prints help information\n    -V, --version    Prints version information\n\nSUBCOMMANDS:\n    add       Add a directory\n    clean     Remove duplicates and non-existent directories [aliases: dedup]\n    dn        Decrease priority for a directory [aliases: down, dec]\n    help      Prints this message or the help of the given subcommand(s)\n    ls        List the directories in PATH [aliases: echo]\n    revert    Revert to a previous version of PATH [aliases: undo]\n    rm        Remove a directory [aliases: del]\n    up        Increase priority for a directory [aliases: inc]\n```\n\nIt would be convenient, but insecure, to have `pad-path` modify the shell's environment variables directly.\nInstead, `pad-path` prints out what the new `$PATH` will look like, and the user can set it as the value for `$PATH`, or pipe it to another command.\n\n### Examples\n\nIn Bash, an example workflow is below.\n\n```bash\n# display your current $PATH\n\u003e pad ls\n/folder/to/remove\n/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/local/games\n/snap/bin\n\n# preview what $PATH would look like if you remove the first folder\n\u003e pad rm /folder/to/remove\n/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/local/games\n/snap/bin\n\n# set the new $PATH\n\u003e export PATH=$(pad rm /folder/to/remove)\n\n# see that the new path is set\n\u003e echo $PATH\n/usr/local/sbin\n/usr/local/bin\n/usr/sbin\n/usr/bin\n/sbin\n/bin\n/usr/games\n/usr/local/games\n/snap/bin\n```\n\nSimilarly, in PowerShell, you can assign the output of a `pad-path` command to `$Env:Path`.\n\n```powershell\n# check the value of $Env:Path\n\u003e pad ls\nC:\\WINDOWS\\system32\nC:\\WINDOWS\nC:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\nC:\\WINDOWS\\System32\\OpenSSH\nC:\\Program Files\\dotnet\n\n# add a new variable to $Env:Path\n\u003e $Env:Path = (pad add \"C:\\Program Files\\new_dir\")\n\n# check that the folder has been added correctly\n\u003e pad ls\nC:\\WINDOWS\\system32\nC:\\WINDOWS\nC:\\WINDOWS\\System32\\WindowsPowerShell\\v1.0\nC:\\WINDOWS\\System32\\OpenSSH\nC:\\Program Files\\dotnet\nC:\\Program Files\\new_dir\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrhawley%2Fpad-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjrhawley%2Fpad-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjrhawley%2Fpad-path/lists"}