A smart CLI tool to clean and update your requirements.txt by fetching the latest package versions from PyPI.
✅ Remove version numbers from requirements.txt (clean mode).
🚧 Fetch and update to the latest package versions from PyPI.
🔜 Preserve comments and structure in the requirements file.
🔜 Fast batch requests to PyPI for improved performance (In Progress).
🔜 Dry-run mode to preview changes before applying (Coming Soon).
🔜 Backup option before modifying requirements.txt (Coming Soon).
pip install update-reqs| Command | Description |
|---|---|
update-reqs clean --file requirements.txt |
Removes all version numbers from the file. |
update-reqs update --file requirements.txt |
Updates all packages to the latest versions. |
update-reqs update --file path/to/requirements.txt |
Updates a specific requirements file. |
update-reqs --help |
Displays help and usage information. |
| Feature | Status |
|---|---|
| Remove version numbers | ✅ Done |
| Check outdated packages | ✅ Done |
| Fetch latest versions | 🚧 In Progress |
| Preserve comments and formatting | 🔜 Coming Soon |
| Parallelized requests for speed | 🔜 Coming Soon |
| Dry-run mode (preview updates) | 🔜 Coming Soon |
| Backup before modifying file | 🔜 Coming Soon |
- Reads
requirements.txtand extracts package names. - Fetches the latest version of each package from PyPI.
- Updates the file while keeping comments and spacing intact.
- Writes back the updated
requirements.txt.
Want to help improve update-reqs? Follow these steps:
- Fork the repo.
- Clone your fork:
git clone https://github.com/your-username/update-reqs.git cd update-reqs - Install dependencies:
pip install -r requirements.txt
- Create a new branch:
git checkout -b feature-name
- Submit a Pull Request! 🚀
This project is licensed under the MIT License.
🔹 Happy Coding!