Metadata-Version: 2.4
Name: shreq
Version: 0.1.0
Summary: Smart cd — auto-install dependencies when you enter a project folder
License: MIT
Keywords: cd,shell,pip,developer-tools,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# cdi 📦

> Smart `cd` + a fistful of shortcuts so you never type `pip install -r requirements.txt` again.

## Install

```bash
pip install cdi
cdi-setup          # injects everything into ~/.bashrc / ~/.zshrc
source ~/.bashrc   # or restart your terminal
```

## `cdi` — smart cd

```bash
cdi my-project              # just cd, nothing extra
cdi my-project -req         # cd + auto-install deps
cdi my-project -venv        # cd + create/activate .venv
cdi my-project -venv -req   # cd + venv + install (the full combo)
cdi my-project -p           # cd + prompt: "install deps? [y/N]"
```

## Standalone shortcuts

| Command        | What it does                                         |
|----------------|------------------------------------------------------|
| `req`          | Install deps in current folder (auto-detects file)   |
| `venv`         | Create `.venv` if missing, then activate it          |
| `vreq`         | `venv` + `req` in one shot                           |
| `deact`        | Deactivate current virtualenv                        |
| `pipu <pkg>`   | `pip install --upgrade <pkg>`                        |
| `freeze`       | `pip freeze > requirements.txt` (with confirmation)  |

### Examples

```bash
# forgot to -req on the way in? just:
req

# fresh clone, want everything set up:
vreq

# done working, get out of the venv:
deact

# upgrade a package:
pipu requests

# lock your deps:
freeze
```

## What `req` / `cdi -req` detects

| File               | Command run                               |
|--------------------|-------------------------------------------|
| `Pipfile`          | `pipenv install`                          |
| `pyproject.toml`   | `pip install -e .`                        |
| `requirements.txt` | `pip install -r requirements.txt`         |
| `environment.yml`  | `conda env update -f environment.yml`     |

## Uninstall

```bash
cdi-setup uninstall
pip uninstall cdi
```

## License

MIT
