Modern cookiecutter template for python cli apps with,
- 🖥️ Typer as main cli libarary.
- 📦 Poetry for dependancy management.
- 🤖 Pre-commit with Ruff for code formatting and MyPy as type checker.
- 🦺 Pytest for unit testing.
- 🐋 Docker setup.
- Python 3.10 or greater.
- Pipx (install instructions).
- Intall
cookiecutter
usingpipx install cookiecutter
. - Install
poetry
usingpipx install poetry
. - Run
cookiecutter https://github.com/chamoda/cookiecutter-typer.git
to create a new project from template.
After template created following steps gets you ups and running with the working cli app.
- Create git repo inside the template with
git init && git add . && git commit -m "Init"
- Create a virtual enviroment with
python3 -m venv venv
and active it usingsource venv/bin/activate
- Go to newly create project directory and run
poetry install
- Run
pre-commit install
to install git hooks. - Run
cli-template
or equalant name you used forapp-slug
to run cli. - Run tests with
pytest
- Clone this project
- Run
cookiecutter PATH_TO_PROJECT --replay --overwrite-if-exists
rerun changes to project back into created template for testing.