TLDR: Jump to the links below to go straight to the setup guides.
There are some great developer tools out there to create template projects/repositories to use as a starting for your project, like cookiecutter
. However, in my experience, most template repos include too much too soon, adding unnecessary bloat before you’ve even written a single line of code. I prefer a much leaner approach—starting with the essentials and adding only what I need, when I need it.
That said, I often find myself digging through old projects just to remember how I set everything up last time.
My goal here is to make that process easier: a few quick command-line prompts and some simple copy-paste steps to get the absolute basics in place—fast, minimal, and flexible.
Use what you need, or jump straight to the commands at the bottom for a quick repo setup.
- Package up your code
- Using UV
- Using poetry
- Setting up your pre-commits
- Setting up basic CI/CD
- GitHub Actions
- Azure DevOps
- Connect your tools to your IDE
- VS Code
Quickstart – full minimal project
Just copy the whole script into your terminal for a quick project setup.
# Package your code
uv init --package --python 3.13 --name tester .
uv add click --dev ruff isort black mypy pytest pylint pre-commit
PACKAGE_NAME=$(grep '^name =' pyproject.toml | sed -E 's/name = "(.*)"/\1/')
echo "" > src/$PACKAGE_NAME/__init__.py
cat <<EOF > src/$PACKAGE_NAME/cli.py
import click
@click.command()
def main():
click.echo("Hello, world!")
EOF
sed -i '' "s|${PACKAGE_NAME}:main|${PACKAGE_NAME}.cli:main|" pyproject.toml
# Pre-commit setup
cat <<EOF > .pre-commit-config.yaml
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0 # Use the latest stable release
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
args: ["--unsafe"]
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: check-symlinks
- id: check-executables-have-shebangs
- id: check-json
- id: detect-private-key
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: pretty-format-json
args: ["--autofix"]
- id: check-toml
- repo: local
hooks:
- id: ruff
name: ruff
entry: uv run ruff check --config='pyproject.toml'
language: system
types: [python]
- repo: local
hooks:
- id: black
name: black
entry: uv run black --config='pyproject.toml'
language: system
types: [python]
- repo: local
hooks:
- id: isort
name: isort
entry: uv run isort
language: system
types: [python]
args: [--profile, black]
- repo: local
hooks:
- id: pylint
name: pylint
entry: uv run pylint --rcfile='pyproject.toml'
language: system
types: [python]
- repo: local
hooks:
- id: mypy
name: mypy
entry: uv run mypy --config-file='pyproject.toml'
language: system
types: [python]
EOF
uv run pre-commit install
uv run pre-commit run --all-files