Project scaffolded with PyScaffold Clickstart.
Project description
ClickStart
A PyScaffold extension to generate modern Click-based CLI projects with batteries included.
ClickStart generates a complete, production-ready Python CLI project structure with sensible defaults and modern tooling. It eliminates the boilerplate of setting up a new CLI application so you can focus on writing your actual code.
Installation
pip install pyscaffoldext-clickstart
This installs the extension alongside PyScaffold. You can verify installation with:
putup --help | grep clickstart
Quick Start
Generate a new CLI project:
putup --clickstart my_project
cd my_project
make bootstrap # Create venv and install dependencies
make test # Run tests
my_project --help # Run your CLI
That's it! You have a working CLI application with tests, documentation, and all the tooling configured.
What Gets Generated
my_project/
├── src/
│ └── my_project/
│ ├── __init__.py # Package initialization
│ ├── __main__.py # python -m support
│ ├── cli.py # Click CLI entry point
│ └── api.py # Core API logic
├── tests/
│ ├── README.md # Testing guide
│ ├── unit/
│ │ └── test_import.py # Package import smoke test
│ └── integration/
│ └── test_layout.py # Project structure tests
├── docs/
│ ├── index.md # Documentation home
│ ├── conf.py # Sphinx configuration
│ └── ... # Other doc files
├── Makefile # Development task automation
├── pyproject.toml # Project configuration (PEP 621)
├── .pre-commit-config.yaml # Pre-commit hooks (Ruff)
├── .gitignore # Git ignore patterns
├── README.md # Project readme
├── LICENSE.txt # MIT license
├── AUTHORS.md # Author credits
├── CHANGELOG.md # Version history
└── CONTRIBUTING.md # Contribution guide
Makefile Targets
The generated Makefile provides common development tasks:
| Target | Description |
|---|---|
make help |
Show all available targets |
make venv |
Create virtual environment |
make bootstrap |
Create venv and install .[dev] |
make precommit |
Install pre-commit hooks |
make test |
Run cached unit + integration tests |
make test-all |
Run all tests (no cache) |
make test-live |
Run @live marked tests |
make lint |
Run Ruff checks |
make format |
Auto-fix with Ruff |
make docs |
Build Sphinx HTML documentation |
make docs-pdf |
Build a single PDF of the docs (needs a LaTeX toolchain) |
make build |
Build wheel and sdist |
make upload |
Upload to PyPI via Twine |
make version |
Show setuptools_scm version |
make changelog |
Show changes since last tag |
make release |
Run tests and create git tag |
make clean |
Remove build artifacts |
make run-cli |
Run CLI via python -m |
Release Workflow
The Makefile includes Git-tag-based release automation:
make release KIND=patch # v1.0.0 -> v1.0.1
make release KIND=minor # v1.0.0 -> v1.1.0
make release KIND=major # v1.0.0 -> v2.0.0
This runs tests, generates changelog, creates a signed git tag, and pushes to origin.
Configuration Options
ClickStart works with all standard PyScaffold options:
# Basic usage
putup --clickstart my_project
# With package name different from project
putup --clickstart my-project -p my_package
# With namespace package
putup --clickstart my_project --namespace my.ns
# Skip creating git repo
putup --clickstart my_project --no-git
# Show what would be generated
putup --clickstart my_project --pretend
Features
Modern Python Packaging
- pyproject.toml only - No setup.py or setup.cfg
- setuptools-scm - Automatic version from git tags
- PEP 621 compliant project metadata
Testing Infrastructure
- pytest with sensible defaults
- Unit/Integration separation - Fast vs slow tests
- Coverage reporting configured
- pytest-xdist for parallel testing
- pytest-timeout for hanging test protection
Code Quality
- Ruff for linting and formatting (replaces Black, isort, flake8)
- Pre-commit hooks configured
- Consistent code style enforced
Documentation
- Sphinx with MyST-Parser for Markdown
- ReadTheDocs configuration included (HTML and hosted PDF via
formats: [pdf]) - API autodoc generation
- Single-file PDF via
make docs-pdf— XeLaTeX engine (Unicode-safe, even in code spans) compiled withlatexmk. Needs a system LaTeX toolchain (xelatex+latexmk+makeindex); optional and not pip-installable, the target fails fast with a friendly message when it's absent.
CLI Framework
- Click for command-line interface
- Entry point configured in pyproject.toml
python -msupport via__main__.py- Logging with
-v/-vvverbosity flags
Customization
Modifying the CLI
Edit src/<package>/cli.py to add commands:
@cli.command()
@click.argument('name')
def greet(name):
"""Greet someone by name."""
click.echo(f'Hello, {name}!')
Adding Dependencies
Edit pyproject.toml:
dependencies = [
"click>=8.1",
"requests>=2.31", # Add your dependency
]
Then reinstall: pip install -e ".[dev]"
Adding Tests
- Fast unit tests go in
tests/unit/ - Slower integration tests go in
tests/integration/
Mark integration tests:
import pytest
@pytest.mark.integration
def test_something_slow():
...
Environment Variables
The Makefile supports customization via environment variables:
# Use a different venv location
make bootstrap VENV=~/.venvs/my_project
# Force test re-run
make test NO_CACHE=1
# Pass arguments to CLI
make run-cli CLI_ARGS="--help"
Requirements
- Python 3.12+
- PyScaffold 4.5+
- Git (for version detection)
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
MIT License - see LICENSE.txt
Acknowledgments
This project extends PyScaffold, the Python project generator. Thanks to the PyScaffold maintainers for the excellent foundation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyscaffoldext_clickstart-2.2.5.tar.gz.
File metadata
- Download URL: pyscaffoldext_clickstart-2.2.5.tar.gz
- Upload date:
- Size: 65.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c663992a7408c28da01625c191b10d23c0aa7f8a5e052e0cb9d0630431bd4792
|
|
| MD5 |
90c948a9291f9572d2b59aab14819595
|
|
| BLAKE2b-256 |
0221c3e3403bf93d720b4f73c101fbb08b677171e5e350553e7afc0ad65f61e1
|
Provenance
The following attestation bundles were made for pyscaffoldext_clickstart-2.2.5.tar.gz:
Publisher:
publish-package.yml on ksteptoe/pyscaffoldext-ClickStart
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscaffoldext_clickstart-2.2.5.tar.gz -
Subject digest:
c663992a7408c28da01625c191b10d23c0aa7f8a5e052e0cb9d0630431bd4792 - Sigstore transparency entry: 1825950167
- Sigstore integration time:
-
Permalink:
ksteptoe/pyscaffoldext-ClickStart@344a090ca5f71908d0bf6fc51dc7760e847fb141 -
Branch / Tag:
refs/tags/v2.2.5 - Owner: https://github.com/ksteptoe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yml@344a090ca5f71908d0bf6fc51dc7760e847fb141 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyscaffoldext_clickstart-2.2.5-py3-none-any.whl.
File metadata
- Download URL: pyscaffoldext_clickstart-2.2.5-py3-none-any.whl
- Upload date:
- Size: 31.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d113dde3d782d218d1cd858f9fcbab733504b3c2b59d918a44b5cffe878d43d7
|
|
| MD5 |
88b4336ad4203c3aa040f96b73d97ac5
|
|
| BLAKE2b-256 |
115fb116d3651260223c8539a9b7e829b77400582890ef5870d4bfb0b492eae1
|
Provenance
The following attestation bundles were made for pyscaffoldext_clickstart-2.2.5-py3-none-any.whl:
Publisher:
publish-package.yml on ksteptoe/pyscaffoldext-ClickStart
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyscaffoldext_clickstart-2.2.5-py3-none-any.whl -
Subject digest:
d113dde3d782d218d1cd858f9fcbab733504b3c2b59d918a44b5cffe878d43d7 - Sigstore transparency entry: 1825950185
- Sigstore integration time:
-
Permalink:
ksteptoe/pyscaffoldext-ClickStart@344a090ca5f71908d0bf6fc51dc7760e847fb141 -
Branch / Tag:
refs/tags/v2.2.5 - Owner: https://github.com/ksteptoe
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-package.yml@344a090ca5f71908d0bf6fc51dc7760e847fb141 -
Trigger Event:
push
-
Statement type: