Skip to main content

forge-template

A Copier template that scaffolds modern Python projects. It currently offers one archetype — library — and is built specifically around copier update, which lets a project pull in template changes months after it was first scaffolded via a three-way merge.

Quick start

The easiest way to use this template is via its companion CLI, create-forge:

uvx create-forge

You can also scaffold directly with Copier, without the CLI:

uvx copier copy gh:Sandsy09/forge-template your-project --trust

--trust is required — the scaffold runs a _tasks step (git init, first commit) after copying files.

The public engine behind both paths is also installable directly — pip install forge-template or uv add forge-template — for clients that consume docs/template-engine-api.md's typed discovery/validation/rendering API without going through Copier or create-forge at all. The published wheel ships the engine facade and its Foundation/component content only; this repository's own tooling (docs/adr/ checks, copier.yml/template/ inspection) is not part of the installable package — see ADR 0036.

Two repos

Repo Role
forge-template This repo. The templates and side-effect-free composition engine.
create-forge The CLI that scaffolds from it.

They're kept separate because Copier resolves template versions from PEP 440 git tags on this repo — merging the two would tangle the CLI's own releases with the template's.

What you get

Answer a handful of questions (project name, build backend, license, Python versions to support, ...) and the scaffold gives you a src/-layout package with pyproject.toml (uv or Hatchling), ruff, mypy and/or pyright, pytest with coverage, a poe-driven task runner, pre-commit hooks, GitHub Actions CI, and optional docs (MkDocs) and changelog generation (git-cliff). The question schema in copier.yml is the source of truth for exactly what's asked and what each answer controls.

Layout

forge-template/
├── copier.yml               Question schema for the scaffold
├── pyproject.toml           This repo's OWN tooling (not part of the scaffold)
├── src/, tests/              ^ same
├── docs/adr/                 Why this repo is shaped the way it is
├── scripts/                 verify-ci.sh: push scaffolded combos, watch CI
├── .github/workflows/       This repo's own CI + release automation
└── template/                Everything here becomes the generated project

Contributing

See CONTRIBUTING.md for the human workflow and CLAUDE.md for the invariants that keep copier update working across projects generated at different points in this template's history; read the latter before changing anything under template/. The canonical Forge vocabulary defines architectural terms, the Foundation guarantees define the mandatory outcomes every generated project receives, the Foundation scope defines which concerns belong in that baseline, the Library archetype contract defines the distributable-package additions composed over it, and the CLI Application archetype contract defines the selected executable reference shape that FT-08.04 will add, the Python support policy defines the supported CPython window and lifecycle, the editor integration strategy keeps the baseline and default profile editor-neutral, the configuration ownership conventions keep runtime settings owner-local and explicitly injected, the environment-variable conventions define owner-prefixed runtime inputs and explicit local dotenv behaviour, the structured logging capability defines owner-local events and one entrypoint-owned logging configuration, the path and resource ownership conventions keep runtime path and resource access owner-local and free of implicit process context, the exception ownership conventions keep exceptions owner-local and require failures to be handled once rather than silently dropped or logged repeatedly, the secret-handling safeguards keep secret-bearing files out of version control without generating a mandatory scanner, the supply-chain provenance contract defines desired SBOM and release-provenance behaviour without generating either yet, the GitHub Action pinning policy keeps remote workflow dependencies immutable and maintainable, the ProjectSpec protocol defines the strict, serialisable generation request for the composition engine, the component manifest protocol defines strict bundled metadata and compatibility for its component catalogue, the composition order contract defines the deterministic order that catalogue applies in, the file conflict and override rules define its output target, disposition, and collision-safety rules, the template variable contract defines the rendered variable namespace and component option vocabulary, the stable template-engine API exposes typed, side-effect-free discovery, validation, planning, and in-memory rendering, the generated-project validation contract checks every rendered result before a client receives it, and docs/adr/ records why significant decisions were made.

License

MIT — see LICENSE.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

forge_template-0.3.1.tar.gz (331.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forge_template-0.3.1-py3-none-any.whl (57.6 kB view details)

Uploaded Python 3

File details

Details for the file forge_template-0.3.1.tar.gz.

File metadata

  • Download URL: forge_template-0.3.1.tar.gz
  • Upload date:
  • Size: 331.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for forge_template-0.3.1.tar.gz
Algorithm Hash digest
SHA256 69c54b9c195c451a1783623065c101081b05d084a033300edf65bffa15dcbd04
MD5 bd4cb535037fcdcad1f258ca527ee84a
BLAKE2b-256 70071c39eba46f1941df5496a0b2a6199060dd216c76c19d08077c3dc9252250

See more details on using hashes here.

Provenance

The following attestation bundles were made for forge_template-0.3.1.tar.gz:

Publisher: release.yml on Sandsy09/forge-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file forge_template-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: forge_template-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 57.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for forge_template-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a877ce5d5645a7f21bc87387eaeb9aaa39fe9944c71c763b1dd378f425b7eaa9
MD5 f9e9ec7497fd3a258bce1c8fe1f85944
BLAKE2b-256 2f587805e290761cc5ee86791cc7ca0eb32eb209d0f77df24b65c6e3d693a48c

See more details on using hashes here.

Provenance

The following attestation bundles were made for forge_template-0.3.1-py3-none-any.whl:

Publisher: release.yml on Sandsy09/forge-template

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.3.2

2 files

This release

0.3.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page