path-cli
is a simple command-line tool to manage your system's $PATH
variable by adding, removing, listing paths, and opening your shell configuration file in Visual Studio Code. It supports both bash
and zsh
shells.
- Add Paths: Add directories to your
$PATH
in your.bashrc
or.zshrc
file. - Remove Paths: Remove directories from your
$PATH
. - List Paths: List all directories currently in your
$PATH
. - Open Config: Open your
.bashrc
or.zshrc
file in Visual Studio Code.
-
Clone the Repository:
git clone https://github.com/yourusername/path-cli.git cd path-cli
-
Build the Application:
dotnet build
-
Add to PATH:
- Compile the application and add the output directory to your system's
$PATH
to use it globally:
export PATH="$PATH:/path/to/your/compiled/path-cli"
- Compile the application and add the output directory to your system's
-
Add a Path
path-cli add <path>
Example:
path-cli add /usr/local/bin
-
Remove a Path
path-cli remove <path>
Example:
path-cli remove /usr/local/bin
-
List Paths
path-cli list
Lists all the paths in your shell configuration file.
-
Open Config File
path-cli code
Opens the
.bashrc
or.zshrc
file in Visual Studio Code.
Display the help information:
path-cli --help
- Shells:
path-cli
automatically detects and supports bothbash
andzsh
shells. - Operating System: The application is designed for Unix-like operating systems (Linux, macOS).