A lightweight, security-conscious Python CLI scaffolder using Bash, uv and GNU Make.
- Python 3.13 and
src/layout - Click, Rich and Loguru
- Dependency management with uv
- Hatchling build backend
- Ruff, strict mypy and pytest
- Bandit for static security analysis
- pip-audit for dependency vulnerability scanning
- Gitleaks for secret detection
- CycloneDX SBOM generation
- Secure logging defaults
- Git initialization
Requirements: Bash, uv, Git, GNU Make and Gitleaks.
On Ubuntu:
sudo apt install git make gitleaksInstall the scaffolder:
git clone https://github.com/falkowich/create-python-skeleton.git
cd create-python-skeleton
install -Dm755 create-skeleton ~/.local/bin/create-skeletoncreate-skeleton PROJECT_NAME [OPTIONS]| Switch | Description |
|---|---|
--api |
Include HTTPX, Pydantic Settings and python-dotenv |
--db |
Include SQLAlchemy, Alembic and Psycopg |
--no-install |
Skip dependency resolution and installation |
--no-git |
Skip Git initialization |
--help |
Show usage |
--version |
Show version |
create-skeleton my-project
create-skeleton api-client --api
create-skeleton database-tool --db
create-skeleton service-tool --api --db
create-skeleton review-project --no-install --no-git| Group | Packages |
|---|---|
| Runtime | click, rich, loguru |
| API | httpx, pydantic-settings, python-dotenv |
| Database | sqlalchemy, alembic, psycopg |
| Development | ruff, mypy, pytest, pytest-cov, ptpython |
| Security | bandit, pip-audit |
| External | gitleaks |
my-project/
├── .gitignore
├── .gitleaks.toml
├── .python-version
├── Makefile
├── README.md
├── pyproject.toml
├── uv.lock
├── src/
│ └── my_project/
│ ├── __init__.py
│ ├── __main__.py
│ ├── main.py
│ └── py.typed
└── tests/
└── test_cli.py
uv run my_project --help
uv run my_project --verbose
uv run my_project --quiet
uv run my_project --no-color| Switch | Description |
|---|---|
--verbose, -v |
Enable debug logging |
--quiet, -q |
Reduce logging verbosity |
--no-color |
Disable colored output |
--help |
Show CLI help |
| Target | Description |
|---|---|
make install |
Synchronize locked dependencies |
make lock |
Resolve dependencies |
make lock-check |
Validate lockfile |
make env-check |
Validate installed environment |
make format |
Format source code |
make format-check |
Verify formatting |
make fix |
Apply lint fixes |
make lint |
Run Ruff |
make typecheck |
Run mypy |
make test |
Run pytest with coverage |
make clean |
Remove generated artifacts |
make help |
Show available targets |
| Target | Description |
|---|---|
make sast |
Bandit static security analysis |
make sca |
Audit locked external dependencies |
make sca-lock |
Export and audit locked dependencies |
make secrets |
Scan working directory |
make secrets-staged |
Scan staged Git changes |
make secrets-history |
Scan available Git history |
make sbom |
Generate CycloneDX SBOM |
make security |
Run security checks |
make supply-chain |
Run dependency checks and generate SBOM |
make check |
Run local quality and security gates |
make ci |
Run extended verification |
- Strict dependency auditing, excluding the local project package.
- Locked runtime and development dependencies.
- No implicit dependency synchronization during verification.
- Redacted Gitleaks findings.
- Secure Loguru exception configuration.
- Restricted project name validation.
- Restrictive file creation permissions.
- No automatic deletion of partially generated projects.
Security reports are stored in reports/ and excluded from Git.
Gitleaks uses 8.16-compatible command syntax, targeting Ubuntu 26.04. A recent uv release supporting CycloneDX exports is required.
These controls provide a development security baseline, not a guarantee of application or supply chain security.
create-skeleton my-project --api
cd my-project
make fix
make format
make check
make supply-chainUpdate dependencies:
uv lock --upgrade
make install
make check- Minimal infrastructure.
- Opinionated development defaults.
- Explicit dependency management.
- Visible security controls.
- No mandatory Docker, CI/CD or Git hooks.
- Generated projects remain standalone.
Bash + uv + Make. Keep it simple.