Here is a simple framework for extensible command line scripts.
pip install -U invisibleroads
cd ~/Documents
git clone https://github.com/invisibleroads/invisibleroads
cd invisibleroads/tests/examples/xyz
pip install -e .
xyz
xyz a
xyz b
xyz x
xyz x a
xyz x b
xyz y
xyz y a
xyz y b
xyz a z
xyz b z
xyz x a z
xyz x b z
xyz y a z
xyz y b z