Migration Guide
This guide helps you migrate from manual PATH management or other tools to pathmaster, and between different versions of pathmaster.
Migrating from Manual PATH Management
If you’ve been managing your PATH manually in shell configuration files, follow these steps to migrate to pathmaster:
Make a backup of your current shell configuration:
cp ~/.bashrc ~/.bashrc.manual-backup
# or for other shells
cp ~/.zshrc ~/.zshrc.manual-backup
Review your current PATH to understand what’s in it:
echo $PATH | tr ':' '\n'
Add your custom directories using pathmaster:
# Add each custom directory you want to keep
pathmaster add ~/bin ~/scripts /opt/custom/bin
Check your PATH to verify everything looks correct:
pathmaster list
Remove any invalid entries:
pathmaster flush
Pathmaster will automatically update your shell configuration file, commenting out or removing your previous PATH declarations and adding its own standardized format.
Migrating from Other PATH Management Tools
If you’re migrating from another PATH management tool:
Disable or uninstall the other tool first
Clean up your shell configuration to remove any entries it added
Follow the steps above to migrate from manual management
Version Migration Notes
Upgrading to 0.2.5
Version 0.2.5 includes:
Enhanced documentation
Improved error messages
Better shell detection
Expanded troubleshooting
No special migration steps are needed.
Upgrading from 0.2.1 or earlier to 0.2.3+
Version 0.2.3 introduced configurable backup modes. After upgrading:
Review the new backup options:
pathmaster --help
Choose your preferred backup mode (if you want to change from the default):
# Example: Switch to backing up only PATH entries
pathmaster --backup-mode path
Upgrading from 0.1.x to 0.2.x
The 0.2.x series introduced significant changes to PATH validation and backup systems:
Check for invalid entries with the improved validation:
pathmaster check
Review your backups to ensure they’re working properly:
pathmaster history
Test a restoration to verify backup functionality:
# First make a current backup
pathmaster add . # This creates a backup even if no change is made
# Then try restoring it
pathmaster history # Note the most recent timestamp
pathmaster restore --timestamp <timestamp>
Handling Breaking Changes
If you encounter issues after upgrading:
Restore from backup:
pathmaster restore
Check the documentation for changed behavior
Report issues on GitHub if you believe you’ve found a bug: https://github.com/jwliles/pathmaster/issues
Best Practices for Future Migrations
Always check release notes before upgrading
Create manual backups of shell configuration files before major upgrades
Test in a non-critical environment if possible
Keep note of any custom PATH entries you’ve added manually