| Crates.io | pathman |
| lib.rs | pathman |
| version | 0.1.2 |
| created_at | 2025-07-12 13:03:36.801783+00 |
| updated_at | 2025-07-12 15:55:04.331131+00 |
| description | A cross-platform library for managing the PATH environment variable. |
| homepage | https://github.com/nhedger/pathman |
| repository | https://github.com/nhedger/pathman |
| max_upload_size | |
| id | 1749276 |
| size | 88,929 |
Pathman is a cross-platform Rust library for prepending and appending
directories to the user's PATH environment variable.
PATHRun the following command to add Pathman to your project's dependencies.
cargo add pathman
PATHUse the prepend_to_path function to add a directory to the beginning of the
PATH environment variable, which will ensure that the specified directory
will be searched first when executing commands. An optional comment can be
specified, and it will be added to the shell configuration file on macOS and
Linux.
use pathman::prepend_to_path;
prepend_to_path("/Users/nicolas/.biome/bin", Some("Biome installation directory"));
PATHUse the append_to_path function to add a directory to the end of the
PATH environment variable. This is useful for adding directories that contain
executables that you want to be available system-wide, but not necessarily
searched first. An optional comment can also be specified, which will be added
to the shell configuration file on macOS and Linux.
use pathman::append_to_path;
append_to_path("/Users/nicolas/.biome/bin", Some("Biome installation directory"));
Pathman is licensed under either of:
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.