A bash utility for creating symlinks to scripts in ~/.local/bin to make them globally accessible from anywhere in your terminal.
- 🔗 Create symlinks for any script to make it globally accessible
- 🛣️ Automatically adds
~/.local/binto your PATH if not present - 🏷️ Support for custom symlink names
- 🗑️ Easy removal of existing symlinks
- 🐚 Works with bash, zsh, and fish shells
- ✅ Automatically makes scripts executable
- Download the
binmyscript - Make it executable:
chmod +x binmy - Use it to install itself:
./binmy binmy
Now you can use binmy from anywhere!
# Create symlink with the script's name (minus .sh extension)
binmy /path/to/script.sh
# Create symlink with a custom name
binmy /path/to/script.sh --as my-commandbinmy -R symlink-namebinmy
# Shows usage information# You have a script at ~/scripts/backup.sh
binmy ~/scripts/backup.sh
# Now you can run it from anywhere
backup# Install a script with a shorter, more convenient name
binmy ~/development/very-long-script-name.sh --as deploy
# Use the shorter name
deploy# Install multiple scripts
binmy ~/bin/git-sync.sh
binmy ~/tools/server-monitor.py --as monitor
# Remove when no longer needed
binmy -R git-sync
binmy -R monitor- Symlink Creation: Creates a symbolic link in
~/.local/binpointing to your script - PATH Management: Automatically adds
~/.local/binto your shell's PATH if not already present - Executable Permissions: Ensures your script has execute permissions
- Name Processing: Strips
.shextensions from default symlink names for cleaner commands
- Bash shell
- Standard Unix utilities (
ln,mkdir,chmod,realpath) - Write access to your home directory
- Bash: Updates
~/.bashrc - Zsh: Updates
~/.zshrc - Fish: Uses
fish_add_pathcommand
For other shells, you'll need to manually add ~/.local/bin to your PATH.
Instead of:
- Copying scripts to system directories (requires sudo)
- Adding multiple directories to PATH
- Creating aliases for every script
- Remembering full paths to your scripts
Use binmy to:
- Keep scripts in their original locations
- Access them globally with simple commands
- Easily manage and remove them when needed
- Maintain a clean, organized
~/.local/bindirectory