Metadata-Version: 2.4
Name: rex
Version: 2.0.14
Summary: Automatically add and delete modules to requirements.txt installing them using pip.
Home-page: https://github.com/VoIlAlex/rex
Download-URL: https://github.com/VoIlAlex/rex/archive/refs/tags/v2.0.14.zip
Author: Ilya Vouk
Author-email: ilya.vouk@gmail.com
License: MIT
Keywords: pip,requirements.txt,dependency,dependencies,requirements,packages,wrapper,repository
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: Unix
Classifier: Topic :: Software Development
Classifier: Topic :: System :: Installation/Setup
Classifier: Topic :: Terminals
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: appdata==2.2.1
Requires-Dist: click>=8.0.3
Requires-Dist: colored>=1.4.3
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: summary

# REX | Automatically Update requirements.txt

[![PyPI Release](https://img.shields.io/pypi/v/to-requirements.txt)](https://pypi.org/project/to-requirements.txt/)
[![Build Status](https://github.com/VoIlAlex/requirements-txt/actions/workflows/publish-to-pypi.yml/badge.svg)](https://github.com/VoIlAlex/requirements-txt/actions/workflows/publish-to-pypi.yml)
[![Maintainability](https://img.shields.io/maintenance/yes/2025)](https://img.shields.io/maintenance/yes/2025)
[![License](https://img.shields.io/github/license/VoIlAlex/requirements-txt)](https://github.com/VoIlAlex/requirements-txt/blob/master/LICENSE.md)

**REX** allows for the automatic management of dependencies in `requirements.txt` using **pip** as a package manager.

[![Demo](https://media.giphy.com/media/y9dUiCm2SwaU8qR0eD/giphy.gif)](https://media.giphy.com/media/y9dUiCm2SwaU8qR0eD/giphy.gif)

## Benefits

- **Easy Setup**: The installation process involves just two steps: installing the package using pip and setting it up using the provided script. That's it.
  
- **One-Command Setup**: Set up a VirtualEnv-based project in a single command. It creates a virtual environment and installs *to-requirements.txt* automatically.

- **Customizable**: Customize it as you prefer: use it only in Git repositories, allow or disallow automated `requirements.txt` file creation, enable or disable the package itself.

- **User-Friendly**: After installation and setup, there are no additional conditions to use. Simply install, uninstall, or upgrade packages using *pip* as usual.

- **Always in Sync**: With *to-requirements.txt*, the project's `requirements.txt` will always stay in sync with packages installed via *pip*.

## Installation

To install the package, run the following command:

```shell
pip install rex
```

To enable all available functionality, add the following lines to your `.bashrc`, `.zshrc`, or other `.*rc` file:

```shell
rex alias
```

or just paste this lines to your `.bashrc`, `.zshrc`, or other `.*rc` file:
```shell
alias rt=". rt"
alias requirements-txt=". requirements-txt"
alias rex=". rex"
```

This enables sourced mode of the CLI execution and allows the CLI to activate or deactivate your virtual environment if required.

### Setup Project

To set up a VirtualEnv-based project, simply type:

```shell
rex init
```

Or, achieve the same effect more easily with aliases:

```shell
rex i
```

*Note: The changes made to **pip** scripts will not affect the ordinary *pip* workflow after uninstalling **to-requirements.txt*.**

## Aliases

There are a few aliases available to use instead of `rex` command:
- `requirements-txt` - legacy command.
- `rt` - legacy command shortened.


## Documentation

For detailed documentation, visit [requirements-txt.readthedocs.io](https://requirements-txt.readthedocs.io/en/latest/index.html).

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution guidelines.

## License

This project is licensed under the [MIT License](LICENSE.md).
