{"id":22468,"library":"to-requirements-txt","title":"to-requirements.txt","description":"Automatically add and delete modules from requirements.txt when installing or uninstalling with pip. Current version: 2.0.14. Releases are monthly.","status":"active","version":"2.0.14","language":"python","source_language":"en","source_url":"https://github.com/VoIlAlex/rex","tags":["pip","requirements.txt","plugin","auto-update","dependencies"],"install":[{"cmd":"pip install to-requirements-txt","lang":"bash","label":"Standard install"}],"dependencies":[],"imports":[{"note":"This is a pip plugin, not a regular Python module. Importing it does nothing.","wrong":"import to_requirements_txt","symbol":"to-requirements-txt","correct":"No explicit import — the package works via pip plugins."}],"quickstart":{"code":"# After installation, pip operations automatically update requirements.txt\n# Example: pip install requests  # adds requests to requirements.txt\n# Example: pip uninstall requests  # removes requests from requirements.txt\n# To disable temporarily: pip install --no-reqs-update requests","lang":"bash","description":"The tool hooks into pip install/uninstall and automatically syncs requirements.txt."},"warnings":[{"fix":"Run pip install/uninstall in the same environment where the package is installed (e.g., same virtualenv).","message":"The package is a pip plugin and does not work with pipx or virtual environments that use different pip paths.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `pip install --no-reqs-update` to skip auto-update, or clean up manually.","message":"It can create duplicate entries if you manually edit requirements.txt then pip install.","severity":"gotcha","affected_versions":"all"},{"fix":"Use pip install/uninstall normally; the plugin works automatically.","message":"The command-line tool 'to-requirements-txt' (as a script) is deprecated; only the pip plugin is maintained.","severity":"deprecated","affected_versions":">=2.0.0"},{"fix":"Disable auto-update with `pip install --no-reqs-update to-requirements-txt` before uninstalling.","message":"If you uninstall this package itself, it may also be removed from requirements.txt.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'2.0.14':17 'add':3 'auto':25 'auto-upd':24 'automat':2 'current':15 'delet':5 'depend':27 'instal':10 'modul':6 'month':20 'pip':14,21 'plugin':23 'releas':18 'requirements.txt':8,22 'to-requirements.txt':1 'uninstal':12 'updat':26 'version':16","created_at":"2026-04-27T17:05:19.873572+00:00","updated_at":"2026-04-27T17:05:19.873572+00:00","problems":{"verify_error":"no import statement found"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"2.0.14","cli_name":"to-requirements-txt","cli_version":"sh: 1: to-requirements-txt: not found","type":"library","homepage":null,"github":"https://github.com/VoIlAlex/rex","docs":null,"changelog":null,"pypi":"https://pypi.org/project/to-requirements-txt/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"skip","verified_at":"2026-06-28","last_verified":"2026-06-28","next_check":"2026-07-05","install_tag":null}}