Just add smth like
function pips() { echo $'\n'$1 >> requirements.txt; pip install $1}
into your .bashrc or .bash_profile and use pips command to install package and save it's name into requirements.txtexample:
pips django-waffle
based on Akash Kothawale comment :)