Overview
copier-astral is an opinionated Copier template for bootstrapping Python projects using Astral's modern toolchain. It provides batteries-included project scaffolding with linting (ruff), type checking (ty), package management (uv), testing (pytest + hatch), documentation (MkDocs), CLI framework (Typer), and CI/CD (GitHub Actions) pre-configured and ready to use.
Core Value Proposition: Generate production-ready Python project structure in seconds with modern Astral tooling (uv, ruff, ty) instead of legacy pip/flake8/mypy, eliminating hours of boilerplate configuration.
Problem Addressed
| Problem |
How copier-astral Solves It |
| Setting up Python projects requires extensive boilerplate |
Single command generates complete project with all tooling configured |
| Legacy tooling (pip, flake8, mypy) is slow and fragmented |
Uses Astral's unified toolchain: uv (10-100x faster), ruff (replaces flake8/black/isort), ty (fast type checker) |
| Inconsistent project structures across teams |
Enforces standardized layout with best practices baked in |
| CI/CD setup is repetitive and error-prone |
Pre-configured GitHub Actions for testing, linting, publishing |
| Documentation setup is tedious |
MkDocs with Material theme and mkdocstrings ready to deploy |
| Multi-Python version testing is complex |
Hatch envs with matrix testing across Python 3.10-3.13 |
| Project updates don't flow back to generated code |
Copier update mechanism allows syncing template improvements |
Key Statistics (as of January 31, 2026)
| Metric |
Value |
| GitHub Stars |
6 |
| Forks |
0 |
| Open Issues |
3 |
| Primary Language |
Jinja |
| Created |
January 28, 2026 |
| Latest Release |
v1.1 (January 31, 2026) |
| License |
MIT |
| Repository Size |
1,539 KB |
Key Features
1. Astral Toolchain Integration
| Tool |
Purpose |
Benefit |
| uv |
Package management, venv, dependencies |
10-100x faster than pip |
| ty |
Type checking |
Astral's new fast type checker |
| ruff |
Linting + formatting |
Replaces flake8, black, isort in single tool |
2. Testing Infrastructure
- pytest: Industry-standard test framework
- hatch: Multi-version testing with matrix envs
- pytest-cov: Coverage reporting with Codecov integration
- Matrix testing: Python 3.10, 3.11, 3.12, 3.13 support
3. Documentation
- MkDocs: Static site generator
- Material theme: Modern, responsive documentation
- mkdocstrings: Auto-generate API docs from docstrings
- GitHub Pages: Automatic deployment via Actions
4. CLI Support (Optional)
- Typer: Modern CLI framework with type hints
- Pre-configured entry point in pyproject.toml
- Help text and command structure ready
5. CI/CD Workflows
- Test workflow: Runs on PR and push to main
- Lint workflow: Ruff + ty checks
- Docs workflow: Build and deploy to GitHub Pages
- Release workflow: Automatic PyPI publishing on tag
- Codecov integration: Coverage badge and reports
6. Containerization (Optional)
- Dockerfile: Multi-stage build for minimal image size
- Docker Compose: Development environment setup
- Production-ready container configuration
7. Code Quality
- pre-commit hooks: Enforced formatting and linting
- Ruff configuration: Comprehensive rule set in pyproject.toml
- Type annotations: Strict typing enforced by ty
8. Template Options
| Option |
Type |
Default |
Description |
project_name |
string |
- |
Human-readable project name |
project_description |
string |
"A Python package" |
Short description |
project_slug |
string |
derived |
Python package name |
python_version |
choice |
3.12 |
Minimum Python (3.10-3.13) |
python_versions_matrix |
string |
"3.10,3.11,3.12,3.13" |
CI matrix versions |
include_cli |
bool |
true |
Include Typer CLI |
include_github_actions |
bool |
true |
Include CI/CD workflows |
include_docker |
bool |
true |
Include Dockerfile |
include_docs |
bool |
true |
Include MkDocs |
include_precommit |
bool |
true |
Include pre-commit hooks |
include_codecov |
bool |
true |
Include Codecov |
include_pypi_publish |
bool |
true |
Include PyPI publishing |
license |
choice |
MIT |
MIT, Apache-2.0, GPL-3.0, BSD-3-Clause, ISC, Proprietary |
Technical Architecture
Installation & Usage
Prerequisites
# Install Copier
pip install copier
# Install required extension for custom Jinja2 filters
pip install copier-template-extensions
Generate a Project
# From GitHub (recommended)
copier copy --trust gh:ritwiktiwari/copier-astral my-project
# From local clone
copier copy --trust /path/to/copier-astral my-project
Note: The --trust flag is required because the template uses custom Jinja2 extensions for auto-detecting git user info and generating slugified package names.
Post-Generation Setup
cd my-project
# Initialize git and install dependencies
git init -b main
make install
# Activate virtual environment
source .venv/bin/activate
# Install pre-commit hooks (if enabled)
pre-commit install
uv run pre-commit run -a
# Verify everything works
make verify
make test
Development Commands
| Command |
Description |
make install |
Install all dependencies |
make verify |
Run all checks (lint, format, type-check) |
make fix |
Auto-fix lint and format issues |
make test |
Run tests |
make test-cov |
Run tests with coverage |
make test-matrix |
Run tests across all Python versions |
make docs |
Build documentation |
make docs-serve |
Serve documentation locally |
Releasing
# Create version tag (triggers PyPI publish workflow)
git tag v0.1.0
git push --tags
Updating Existing Projects
# Sync with latest template improvements
copier update --trust
Generated Project Structure
Relevance to Claude Code Development
Direct Applications
- Plugin Scaffolding: Use as base template for generating new Claude Code plugins with consistent structure
- Skill Development: Bootstrap Python-based skills with proper testing and type checking
- MCP Server Templates: Foundation for creating MCP servers with Astral tooling
- Agent Infrastructure: Scaffold agent implementations with production-ready CI/CD
Patterns Worth Adopting
- Astral Toolchain: uv + ruff + ty combination is significantly faster than legacy pip + flake8 + mypy
- Makefile Abstraction: Simple
make verify, make test commands abstract complex uv/hatch invocations
- Copier Update Mechanism: Template improvements can propagate to existing projects via
copier update
- Feature Toggles: Conditional file generation based on boolean options is clean for customization
- Matrix Testing: Hatch envs for multi-Python testing without Docker complexity
- Single Source of Truth: pyproject.toml contains all tool configurations (ruff, pytest, hatch, etc.)
Integration Opportunities
- claude-code-plugin-template: Fork/adapt for Claude Code plugin-specific scaffolding
- mcp-server-template: Specialize for MCP server projects with FastMCP defaults
- skill-template: Create skill-specific variant with SKILL.md and references/ structure
- Pre-commit Integration: This repo already uses prek - could sync ruff configurations
Key Insight
copier-astral demonstrates the modern Python tooling stack that Claude Code-related projects should adopt. The Astral toolchain (uv, ruff, ty) provides 10-100x performance improvements over legacy tools while maintaining compatibility. The Copier template mechanism allows project structure standardization with the ability to propagate improvements to existing projects - a pattern applicable to Claude Code plugin/skill templates.
References
- Documentation Site: https://ritwiktiwari.github.io/copier-astral/ (accessed 2026-01-31)
- GitHub Repository: https://github.com/ritwiktiwari/copier-astral (accessed 2026-01-31)
- User Guide: https://ritwiktiwari.github.io/copier-astral/guide/ (accessed 2026-01-31)
- Template Options: https://ritwiktiwari.github.io/copier-astral/options/ (accessed 2026-01-31)
- Copier Documentation: https://copier.readthedocs.io/ (accessed 2026-01-31)
- uv Documentation: https://docs.astral.sh/uv/ (accessed 2026-01-31)
- ruff Documentation: https://docs.astral.sh/ruff/ (accessed 2026-01-31)
- ty Documentation: https://docs.astral.sh/ty/ (accessed 2026-01-31)
- Typer Documentation: https://typer.tiangolo.com/ (accessed 2026-01-31)
- MkDocs Material: https://squidfunk.github.io/mkdocs-material/ (accessed 2026-01-31)
Related Tools
| Tool |
Relationship |
| cookiecutter |
Original Python project template tool (Copier is successor) |
| copier |
Template engine this project uses |
| python-project-template |
Alternative Copier template without Astral tooling |
| cruft |
Cookiecutter with update capability (similar to Copier) |
| hatch |
Python project manager used for multi-version testing |
1---2name: copier-astral-python-project-template-with-astral-toolch-23description: copier-astral is an opinionated Copier template for bootstrapping Python projects using Astral's modern toolchain. It provides batteries-included project scaffolding with linting (ruff), type...4license: MIT5---67## Overview89copier-astral is an opinionated Copier template for bootstrapping Python projects using Astral's modern toolchain. It provides batteries-included project scaffolding with linting (ruff), type checking (ty), package management (uv), testing (pytest + hatch), documentation (MkDocs), CLI framework (Typer), and CI/CD (GitHub Actions) pre-configured and ready to use.1011**Core Value Proposition**: Generate production-ready Python project structure in seconds with modern Astral tooling (uv, ruff, ty) instead of legacy pip/flake8/mypy, eliminating hours of boilerplate configuration.1213---1415## Problem Addressed1617| Problem | How copier-astral Solves It |18|---------|----------------------------|19| Setting up Python projects requires extensive boilerplate | Single command generates complete project with all tooling configured |20| Legacy tooling (pip, flake8, mypy) is slow and fragmented | Uses Astral's unified toolchain: uv (10-100x faster), ruff (replaces flake8/black/isort), ty (fast type checker) |21| Inconsistent project structures across teams | Enforces standardized layout with best practices baked in |22| CI/CD setup is repetitive and error-prone | Pre-configured GitHub Actions for testing, linting, publishing |23| Documentation setup is tedious | MkDocs with Material theme and mkdocstrings ready to deploy |24| Multi-Python version testing is complex | Hatch envs with matrix testing across Python 3.10-3.13 |25| Project updates don't flow back to generated code | Copier update mechanism allows syncing template improvements |2627---2829## Key Statistics (as of January 31, 2026)3031| Metric | Value |32|--------|-------|33| GitHub Stars | 6 |34| Forks | 0 |35| Open Issues | 3 |36| Primary Language | Jinja |37| Created | January 28, 2026 |38| Latest Release | v1.1 (January 31, 2026) |39| License | MIT |40| Repository Size | 1,539 KB |4142---4344## Key Features4546### 1. Astral Toolchain Integration4748| Tool | Purpose | Benefit |49|------|---------|---------|50| **uv** | Package management, venv, dependencies | 10-100x faster than pip |51| **ty** | Type checking | Astral's new fast type checker |52| **ruff** | Linting + formatting | Replaces flake8, black, isort in single tool |5354### 2. Testing Infrastructure5556- **pytest**: Industry-standard test framework57- **hatch**: Multi-version testing with matrix envs58- **pytest-cov**: Coverage reporting with Codecov integration59- **Matrix testing**: Python 3.10, 3.11, 3.12, 3.13 support6061### 3. Documentation6263- **MkDocs**: Static site generator64- **Material theme**: Modern, responsive documentation65- **mkdocstrings**: Auto-generate API docs from docstrings66- **GitHub Pages**: Automatic deployment via Actions6768### 4. CLI Support (Optional)6970- **Typer**: Modern CLI framework with type hints71- Pre-configured entry point in pyproject.toml72- Help text and command structure ready7374### 5. CI/CD Workflows7576- **Test workflow**: Runs on PR and push to main77- **Lint workflow**: Ruff + ty checks78- **Docs workflow**: Build and deploy to GitHub Pages79- **Release workflow**: Automatic PyPI publishing on tag80- **Codecov integration**: Coverage badge and reports8182### 6. Containerization (Optional)8384- **Dockerfile**: Multi-stage build for minimal image size85- **Docker Compose**: Development environment setup86- Production-ready container configuration8788### 7. Code Quality8990- **pre-commit hooks**: Enforced formatting and linting91- **Ruff configuration**: Comprehensive rule set in pyproject.toml92- **Type annotations**: Strict typing enforced by ty9394### 8. Template Options9596| Option | Type | Default | Description |97|--------|------|---------|-------------|98| `project_name` | string | - | Human-readable project name |99| `project_description` | string | "A Python package" | Short description |100| `project_slug` | string | derived | Python package name |101| `python_version` | choice | 3.12 | Minimum Python (3.10-3.13) |102| `python_versions_matrix` | string | "3.10,3.11,3.12,3.13" | CI matrix versions |103| `include_cli` | bool | true | Include Typer CLI |104| `include_github_actions` | bool | true | Include CI/CD workflows |105| `include_docker` | bool | true | Include Dockerfile |106| `include_docs` | bool | true | Include MkDocs |107| `include_precommit` | bool | true | Include pre-commit hooks |108| `include_codecov` | bool | true | Include Codecov |109| `include_pypi_publish` | bool | true | Include PyPI publishing |110| `license` | choice | MIT | MIT, Apache-2.0, GPL-3.0, BSD-3-Clause, ISC, Proprietary |111112---113114## Technical Architecture115116<eg>117copier copy --trust gh:ritwiktiwari/copier-astral my-project118 │119 ▼120┌─────────────────────────────────────────────────────────┐121│ Copier Template Engine │122│ ┌─────────────────────────────────────────────────┐ │123│ │ Interactive Prompts │ │124│ │ - Project metadata (name, author, license) │ │125│ │ - Feature toggles (CLI, Docker, docs) │ │126│ │ - Python version selection │ │127│ └─────────────────────────────────────────────────┘ │128│ │ │129│ ▼ │130│ ┌─────────────────────────────────────────────────┐ │131│ │ Jinja2 Template Processing │ │132│ │ - copier-template-extensions for slug/git info │ │133│ │ - Conditional file inclusion based on options │ │134│ │ - Variable substitution in all files │ │135│ └─────────────────────────────────────────────────┘ │136└─────────────────────────────────────────────────────────┘137 │138 ▼139┌─────────────────────────────────────────────────────────┐140│ Generated Project Structure │141│ │142│ my-project/ │143│ ├── src/my_project/ │144│ │ ├── __init__.py │145│ │ ├── main.py │146│ │ └── cli.py (if include_cli) │147│ ├── tests/ │148│ │ └── test_main.py │149│ ├── docs/ (if include_docs) │150│ ├── .github/workflows/ (if include_github_actions) │151│ ├── Dockerfile (if include_docker) │152│ ├── pyproject.toml │153│ ├── Makefile │154│ └── .pre-commit-config.yaml (if include_precommit) │155└─────────────────────────────────────────────────────────┘156</eg>157158---159160## Installation & Usage161162### Prerequisites163164```bash165# Install Copier166pip install copier167168# Install required extension for custom Jinja2 filters169pip install copier-template-extensions170```171172### Generate a Project173174```bash175# From GitHub (recommended)176copier copy --trust gh:ritwiktiwari/copier-astral my-project177178# From local clone179copier copy --trust /path/to/copier-astral my-project180```181182**Note**: The `--trust` flag is required because the template uses custom Jinja2 extensions for auto-detecting git user info and generating slugified package names.183184### Post-Generation Setup185186```bash187cd my-project188189# Initialize git and install dependencies190git init -b main191make install192193# Activate virtual environment194source .venv/bin/activate195196# Install pre-commit hooks (if enabled)197pre-commit install198uv run pre-commit run -a199200# Verify everything works201make verify202make test203```204205### Development Commands206207| Command | Description |208|---------|-------------|209| `make install` | Install all dependencies |210| `make verify` | Run all checks (lint, format, type-check) |211| `make fix` | Auto-fix lint and format issues |212| `make test` | Run tests |213| `make test-cov` | Run tests with coverage |214| `make test-matrix` | Run tests across all Python versions |215| `make docs` | Build documentation |216| `make docs-serve` | Serve documentation locally |217218### Releasing219220```bash221# Create version tag (triggers PyPI publish workflow)222git tag v0.1.0223git push --tags224```225226### Updating Existing Projects227228```bash229# Sync with latest template improvements230copier update --trust231```232233---234235## Generated Project Structure236237<eg>238my-project/239├── src/240│ └── my_project/241│ ├── __init__.py # Package version242│ ├── main.py # Core module243│ └── cli.py # Typer CLI (optional)244├── tests/245│ └── test_main.py # Test examples246├── docs/ # MkDocs (optional)247│ ├── index.md248│ └── api.md249├── .github/250│ └── workflows/ # CI/CD (optional)251│ ├── test.yml252│ ├── lint.yml253│ ├── docs.yml254│ └── release.yml255├── .pre-commit-config.yaml # Pre-commit hooks (optional)256├── Dockerfile # Container (optional)257├── docker-compose.yml # Dev environment (optional)258├── pyproject.toml # Project config (uv, ruff, hatch)259├── Makefile # Dev commands260├── LICENSE261└── README.md262</eg>263264---265266## Relevance to Claude Code Development267268### Direct Applications2692701. **Plugin Scaffolding**: Use as base template for generating new Claude Code plugins with consistent structure2712. **Skill Development**: Bootstrap Python-based skills with proper testing and type checking2723. **MCP Server Templates**: Foundation for creating MCP servers with Astral tooling2734. **Agent Infrastructure**: Scaffold agent implementations with production-ready CI/CD274275### Patterns Worth Adopting2762771. **Astral Toolchain**: uv + ruff + ty combination is significantly faster than legacy pip + flake8 + mypy2782. **Makefile Abstraction**: Simple `make verify`, `make test` commands abstract complex uv/hatch invocations2793. **Copier Update Mechanism**: Template improvements can propagate to existing projects via `copier update`2804. **Feature Toggles**: Conditional file generation based on boolean options is clean for customization2815. **Matrix Testing**: Hatch envs for multi-Python testing without Docker complexity2826. **Single Source of Truth**: pyproject.toml contains all tool configurations (ruff, pytest, hatch, etc.)283284### Integration Opportunities2852861. **claude-code-plugin-template**: Fork/adapt for Claude Code plugin-specific scaffolding2872. **mcp-server-template**: Specialize for MCP server projects with FastMCP defaults2883. **skill-template**: Create skill-specific variant with SKILL.md and references/ structure2894. **Pre-commit Integration**: This repo already uses prek - could sync ruff configurations290291### Key Insight292293copier-astral demonstrates the modern Python tooling stack that Claude Code-related projects should adopt. The Astral toolchain (uv, ruff, ty) provides 10-100x performance improvements over legacy tools while maintaining compatibility. The Copier template mechanism allows project structure standardization with the ability to propagate improvements to existing projects - a pattern applicable to Claude Code plugin/skill templates.294295---296297## References2982991. **Documentation Site**: <https://ritwiktiwari.github.io/copier-astral/> (accessed 2026-01-31)3002. **GitHub Repository**: <https://github.com/ritwiktiwari/copier-astral> (accessed 2026-01-31)3013. **User Guide**: <https://ritwiktiwari.github.io/copier-astral/guide/> (accessed 2026-01-31)3024. **Template Options**: <https://ritwiktiwari.github.io/copier-astral/options/> (accessed 2026-01-31)3035. **Copier Documentation**: <https://copier.readthedocs.io/> (accessed 2026-01-31)3046. **uv Documentation**: <https://docs.astral.sh/uv/> (accessed 2026-01-31)3057. **ruff Documentation**: <https://docs.astral.sh/ruff/> (accessed 2026-01-31)3068. **ty Documentation**: <https://docs.astral.sh/ty/> (accessed 2026-01-31)3079. **Typer Documentation**: <https://typer.tiangolo.com/> (accessed 2026-01-31)30810. **MkDocs Material**: <https://squidfunk.github.io/mkdocs-material/> (accessed 2026-01-31)309310---311312## Related Tools313314| Tool | Relationship |315|------|--------------|316| [cookiecutter](https://github.com/cookiecutter/cookiecutter) | Original Python project template tool (Copier is successor) |317| [copier](https://github.com/copier-org/copier) | Template engine this project uses |318| [python-project-template](https://github.com/rochacbruno/python-project-template) | Alternative Copier template without Astral tooling |319| [cruft](https://github.com/cruft/cruft) | Cookiecutter with update capability (similar to Copier) |320| [hatch](https://hatch.pypa.io/) | Python project manager used for multi-version testing |