addtopath is a CLI program which allows you to easily add a directory to your PATH using the terminal on Windows.
You need to have Python 3.6 or higher installed. This will allow you to install addtopath with Python's package manager, pip.
To install addtopath with pip:
pip install addtopathAfter installation with pip, the addtopath executable should be available on the PATH. It's very easy to use: just run it with a directory as an argument, to add that directory to the PATH.
To add the current working directory to the PATH, run:
addtopath .It works with relative paths:
addtopath ..It also works with the ~ symbol in Powershell, for example:
addtopath ~/scriptsYou can, of course, supply the absolute path to your target directory:
addtopath "C:\Program Files\SomeProgram"addtopath adds to the user path by default. This doesn't require admin permissions, and is usually sufficient. However, you can instead add to the system path using the -s or --system flag.
For example:
addtopath . -sNote: This requires an administrator Powershell or Command Prompt.