Skip to main content

Smart cd — auto-install dependencies when you enter a project folder

Project description

cdi 📦

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

Install

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

cdi — smart cd

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

# 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

cdi-setup uninstall
pip uninstall cdi

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shreq-0.1.0.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shreq-0.1.0-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file shreq-0.1.0.tar.gz.

File metadata

  • Download URL: shreq-0.1.0.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for shreq-0.1.0.tar.gz
Algorithm Hash digest
SHA256 67a6fccfc453389366fc434c9e1821c5a22ea778ec952c59da90d384157bb5b5
MD5 16f63a6ae8addb1bf6e6a20e11c27c3c
BLAKE2b-256 cf7611229ecdeeecdb79c2bfe2db7058ecac38d834958e4a104dce8dfe2aba4a

See more details on using hashes here.

File details

Details for the file shreq-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shreq-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for shreq-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7920f60a7a2736b9bb9d0e567fe0335ee3dd8deb6be3f7173f4dd115300c066
MD5 72af4e48cd34dafc692bbfb4fabe9e87
BLAKE2b-256 a0ca3332ceda98cf182c0a337c7d7774e6e40e0b2e6936e086b4949e0c0c6dc9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page