Add to path is a simple and lightweight script enabling you to add things to $PATH with just one command. I created this app mostly due to the fact that I always forget how to add things to $PATH and end up googling (shame yep yep). Anyway, this very thing made me write this app in like half an hour and felt like sharing it here - maybe some of you have same problem, or just don't enjoy opening your .rc file everytime. 💚
Caution
Add to path supports only BASH and ZSH shells.
And likely won't ever support any other, since these are only two popular ones.
To install this script you need to have UV. If you need help installing it refer to this page: https://docs.astral.sh/uv/getting-started/installation.
If you have installed UV you can now proceed to installing this very executable. To do this simply run:
uv tool install git+https://github.com/TaXi0k/add_to_path.gitAnd that's it.
If you for some reason don't feel like installing straight from GitHub you can clone this repository and install it manually. To do this run:
git clone https://github.com/TaXi0k/add_to_path
cd add_to_path
uv tool install .To uninstall this app run:
uv tool uninstall add_to_pathadditionally if you installed it by manual download you might also want to remove the cloned directory.
To use this app simply run:
adtp <path>or
add_to_path <path>both versions are perfectly valid and do the same thing.
Note
After adding something to $PATH, your shell won’t refresh automatically.
You need to either restart your terminal or run source ~/.bashrc / source ~/.zshrc. 🌿
This tool doesn’t do that for you - on purpose. Injecting shell functions into your rc file felt a bit too intrusive, so I decided not to touch your config more than absolutely necessary.
If you want automatic refresh, you can add this one small function to your rc file:
adtp() {
command adtp "$1"
source ~/.bashrc # or ~/.zshrc
}Now running adtp <path> will automatically reload your shell config.
- 💚 Does this modify my rc file?
Yes, this script adds literal two lines to your rc file - to be precise it adds the following string to end of your rc file:"\n# Created by add_to_path\nsource ~/.config/add_to_path/paths". If you want to investigate further checklink_in_rc_file(shell)function in main.py. - 💚 Is this safe?
Well yes, it is - I created this app to use it myself (exacly what creator of malware would say). It can't damage your rc file - it opens it in append and read modes only, never in write mode. - 💚 What if I use fish or any other shell?
Then you can't use this script. I'm not planning to support it soon nor ever. - 💚 Does it work on macOS?
I haven't tried it but it technically should, since it uses BASH / ZSH. - 💚 How does it work?
- It doesn't modify any crucial system files (well any system files)
Ok I kinda lied. As I said it appends two lines to rc file, but I promise that's it. - All paths are stored in a specific file
All paths added to$PATHusing this app are stored in~/.config/add_to_path/pathsfile. That file is sourced inside your rc file to avoid cluttering your precious rc. - I think there's nothing more
This app just automates something you otherwise have to do manually and from my experience takes a bit of time - and to me is unpleasant.
- It doesn't modify any crucial system files (well any system files)
To me, I did this. I don't know why I even wrote this very line xd.
© 2026 TaXi0k
This project is distributed under CC BY-NC 4.0 license. This means:
- Use the code in your own projects
- Modify it, fork it, rewrite it
- Share it anywhere (GitHub, Discord etc.)
- Distribute it for free
- Accept optional donations (Ko-fi, BuyMeACoffee, tips)
- Give proper attribution (author + link to the original repo)
- Mention that it's licensed under CC BY-NC 4.0
- Indicate if you made any modifications
- Sell this code
- Sell projects that include this code
- Sell modified versions of this code
- Use this code in paid products, services, or subscriptions
- Offer premium/commercial versions based on this code
You write entirely new code from scratch, without copying or deriving from this project - i.e. a proper clean room implementation.
For more info check LICENSE.
If you use, modify or share this project, please include an attribution similar to the following:
Based on: "add_to_path" by TaXi0k
Original repository: https://github.com/TaXi0k/add_to_path
Licensed under: CC BY-NC 4.0
Modifications: none / minor changes / custom additions
- Of course you can phrase that differently - it just needs to contain these information or even more if you are that kind.
- A link to original repo is required whenever possible.
- Mentioning modifications is of course only required only if you actually changed the code.
- But really let's just be people and respect each other's work :3
