Skip to main content

repo-scaffold

PyPI Python Version CI License: MIT Ruff

A modern project scaffolding tool that helps you quickly create standardized project structures with best practices.

Features

  • 🚀 Quick project initialization with modern best practices
  • 📦 Cookiecutter templates with standardized structure
  • ⚙️ Interactive project configuration
  • 🔧 Pre-configured development tools (ruff, pytest, just)
  • 📚 Documentation setup with MkDocs Material
  • 🔄 GitHub Actions workflows included
  • 🏷️ Conventional-commit driven versioning via Cocogitto
  • 📦 Dependency / workspace management with uv

Installation

# Recommended: install as a uv tool
uv tool install repo-scaffold

# Or run without installing
uvx repo-scaffold list

# Or with pip
pip install repo-scaffold

Quick Start

# List available templates
repo-scaffold list

# Create a new project (interactive)
repo-scaffold create python

# Create a project in a specific directory, no prompts
repo-scaffold create python --no-input -o ./my-projects

# Create a uv workspace monorepo
repo-scaffold create uv-workspace -o ./my-projects

# Push a generated project to GitHub: create the repo, set CI secrets,
# push the initial commit, create the gh-pages branch, and point GitHub
# Pages at it. Reads GITHUB_TOKEN from the environment.
export GITHUB_TOKEN=ghp_...
repo-scaffold gh-init ./my-projects/my-python-project

# Add a new package to a workspace project (auto-detects Rust or uv)
repo-scaffold add-package my-new-lib -p ./my-projects/my-workspace

See the GitHub bootstrap docs for the full flag list and the secrets/variables gh-init knows how to set.

End-to-End: From create to GitHub Pages

A full walkthrough from an empty directory to a published repository with CI and docs.

# 1. Generate the project. `create` also runs `git init` on branch `master`
#    (opt out with --no-git). Drop --no-input to configure it interactively.
repo-scaffold create python --no-input -o ./workspace
cd ./workspace/my_python_project   # directory name is the project_slug

# 2. (Optional) make your own first changes here. gh-init creates the
#    initial commit for you, so an extra commit at this point is optional.

# 3. Provide a GitHub token with `repo` scope (or `public_repo` for public repos).
export GITHUB_TOKEN=ghp_...

# 4. Bootstrap GitHub. By default gh-init will:
#      - create the repository (name/description pulled from pyproject.toml)
#      - set the CI secrets/variables the generated workflows expect
#      - push the initial commit to `master`
#      - create the `gh-pages` branch and set it as the GitHub Pages source
repo-scaffold gh-init .

# 5. Publish docs: push a release tag (or let the Cocogitto version-bump
#    workflow create one). The docs-deploy workflow builds the site and
#    pushes it to `gh-pages`, which GitHub Pages now serves automatically.
git push --tags   # or: git tag 0.1.0 && git push origin 0.1.0

Common opt-outs:

  • repo-scaffold create python --no-git — skip the local git init.
  • repo-scaffold gh-init . --private — create a private repository.
  • repo-scaffold gh-init . --protect-branch — protect the default branch (require PR review; admins can still push so releases keep working).
  • repo-scaffold gh-init . --no-push — create the repo and set secrets without pushing (Pages setup is skipped, since it needs the pushed branch).
  • repo-scaffold gh-init . --no-pages — push, but don't create gh-pages or configure Pages (you can set it later in repo Settings → Pages).

Available Templates

Currently supported project templates:

  • python — single-package Python project

    • pyproject.toml + uv for dependency management
    • pytest + coverage, ruff for lint & format
    • Optional Click CLI, Podman compose files, GitHub Actions, MkDocs Material docs
    • Cocogitto release workflow that bumps version, writes CHANGELOG.md, tags, and triggers PyPI publish
  • uv-workspace — uv workspace monorepo

    • Workspace-aware pyproject.toml with one initial member under packages/
    • Shared dev / docs dependency groups
    • Cocogitto monorepo release workflow with per-package and global tags
    • Same lint / test / docs tooling as the python template
  • react — TanStack Start (SSR React) project

    • TanStack Router/Query/Form/Store, MUI, Tailwind CSS
    • Biome for lint/format, pnpm for deps, Vitest for testing
    • Optional Docker/Podman support, GitHub Actions CI, and demo pages
  • rust — Axum + SQLx cargo workspace project

    • Cargo workspace with packages/api-server/ as initial member
    • Domain-driven architecture (domain/infra/api/dto layers)
    • Axum web framework + SQLx (PostgreSQL, compile-time queries, offline mode)
    • JWT auth middleware, health check reference domain
    • Optional Docker/Podman, GitHub Actions CI, OpenAPI/Swagger (utoipa), and OpenTelemetry support
    • Cocogitto monorepo versioning with cargo-workspaces
  • ts-sdk — TypeScript SDK library

    • Vite lib mode producing dual ESM + CJS output with bundled type declarations
    • Generic ApiClient with automatic token lifecycle (authenticate → cache → refresh → fallback)
    • AuthService supporting four OAuth grant types with exponential-backoff retry
    • Prettier for formatting, pnpm for deps
    • Optional GitHub Actions CI + dual npm/GPR publish + Cocogitto version bump
  • pnpm-workspace — pnpm monorepo with mixed sub-package types

    • Workspace root with pnpm-workspace.yaml + Prettier
    • Initial sub-package type selection: vue-app / ts-lib / react-app / ts-cli
    • Cocogitto monorepo versioning with pnpm --filter per-package hooks
    • repo-scaffold add-package supports adding new sub-packages to pnpm workspaces
    • Optional GitHub Actions CI
  • vue-project — standalone Vue 3 project with Router, Pinia, and Tailwind CSS

    • Full layered component structure: components/ui/, components/layout/, components/common/
    • Pages with colocated sub-components: pages/HomePage/, pages/AboutPage/
    • Vue Router with lazy-loaded routes, Pinia stores with Composition API
    • Tailwind CSS v4 via @tailwindcss/vite, Prettier, pnpm
    • Optional GitHub Actions CI + Cocogitto version bump

Both templates use just (via rust-just) as the task runner. Bootstrap from a clean machine with uvx --from rust-just just init — that recipe also installs rust-just as a uv tool, so every subsequent recipe can be run as plain just <recipe>.

Adding Packages to Workspaces

The add-package command adds a new member to a workspace project and updates cog.toml for Cocogitto tracking:

# Inside a generated workspace project directory
repo-scaffold add-package my-new-lib

# Or specify the project path explicitly
repo-scaffold add-package my-new-lib -p /path/to/project

The command auto-detects the project type:

  • Rust workspace (Cargo.toml with [workspace]): creates a crate skeleton under packages/<name>/, appends a [packages.<name>] section to cog.toml with cargo workspaces version pre-bump hooks, and runs cargo check.
  • uv workspace (pyproject.toml with [tool.uv.workspace]): runs uv init --lib, appends a [packages.<name>] section to cog.toml with uv version --package pre-bump hooks, and runs uv sync.

Development Setup

# Clone the repository
git clone https://github.com/ShawnDen-coder/repo-scaffold.git
cd repo-scaffold

# Bootstrap once: installs rust-just as a uv tool, syncs deps, installs hooks
uvx --from rust-just just init

# Subsequent runs use `just` directly
just lint
just test

Releasing

This project (and the templates it generates) uses Cocogitto driven by conventional commits:

  • Push a feat: / fix: / breaking-change commit to master and the version-bump workflow runs cog bump --auto, updating CHANGELOG.md, bumping pyproject.toml via uv version, committing, and tagging.
  • The release workflow then builds and publishes the tagged version.

See cog.toml for hook and changelog configuration.

Metadata

Release files for repo-scaffold 0.25.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for repo-scaffold 0.25.0
File Size Uploaded
repo_scaffold-0.25.0.tar.gz 145.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for repo-scaffold 0.25.0
File Interpreter ABI Platform
repo_scaffold-0.25.0-py3-none-any.whl Python 3 none any Details

Total release size: 382.0 kB

Release files / repo_scaffold-0.25.0.tar.gz

Download URL repo_scaffold-0.25.0.tar.gz
Size 145.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ffcfc99757cda44fd654ac67d2dd22454a73de775cd43bcaf9b96331056af3b7
BLAKE2b-256 checksum
How to use checksums
9ffe66eca5a310e3adb7a56cdd326be592344ff0e024b2c8adb734b831adcace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / repo_scaffold-0.25.0-py3-none-any.whl

Download URL repo_scaffold-0.25.0-py3-none-any.whl
Size 236.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1979a10ed2eafc310bc42a747150c8c9e8d4ef62d589a1261a4db6d015e929c
BLAKE2b-256 checksum
How to use checksums
7802e26316b5bdff38a574d7f5381ec13c61a8650651e17fbabbd7ad6dee301c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.0 {"installer":{"name":"uv","version":"0.12.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

0.35.0

2 release files

0.34.0

2 release files

0.33.0

2 release files

0.32.0

2 release files

0.31.1

2 release files

0.31.0

2 release files

0.30.0

2 release files

0.29.4

2 release files

0.29.3

2 release files

0.29.2

2 release files

0.29.1

2 release files

0.29.0

2 release files

0.28.0

2 release files

0.27.1

2 release files

0.26.0

2 release files

This release

0.25.0 This release

2 release files

0.24.0

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.21.0

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.4

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.3

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.5.3

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release 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