A lightweight CLI tool for generating modern Python project structures with best practices built in
Project description
pyforge
pyforge is a lightweight CLI that generates a modern Python project scaffold with sensible defaults for packaging, linting, testing, typing, and CI.
Features
- Interactive project setup with input validation
- src-layout package structure
- PEP 621 pyproject.toml generation
- Optional dynamic versioning helper at scripts/setup.py
- Optional GitHub Actions CI workflow
- Ready-to-use test and quality tool configuration
Install
For local development:
python -m pip install -e .
Global user install (recommended for CLI usage):
Linux/macOS:
python3 -m pip install --user pyforge
Windows:
py -m pip install --user pyforge
If you use pipx:
pipx install pyforge
Usage
Run the CLI:
pyforge
Answer the prompts, review the summary, and confirm generation.
By default, pyforge can also bootstrap a .venv inside the generated project and install either:
-e .[dev]when recommended packages are enabled-e .otherwise
Development Setup
python -m pip install -e .[dev]
pre-commit install
Build Package
Create source and wheel distributions:
python -m build
The artifacts will be created under dist/.
Validate Package Metadata
Check long description and distribution metadata:
python -m twine check dist/*
Upload To PyPI
- Create an API token in your PyPI account.
- Set it as an environment variable:
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-XXXXXXXXXXXXXXXXXXXXXXXX
- Upload:
python -m twine upload dist/*
Use TestPyPI first if you want a dry run:
python -m twine upload --repository testpypi dist/*
Project details
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 pyforge_scaffold-0.0.0.tar.gz.
File metadata
- Download URL: pyforge_scaffold-0.0.0.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f733659c5aefd93b8f5fb42d90cd47ea934703250a848260da0ea990f9ad49d
|
|
| MD5 |
4cab114977deff078ca00a6b221cea53
|
|
| BLAKE2b-256 |
1c9c7d6a324a53f4de41855d4c95a89e92ec0738da8c6fe11ff0c0d8f5a17f82
|
File details
Details for the file pyforge_scaffold-0.0.0-py3-none-any.whl.
File metadata
- Download URL: pyforge_scaffold-0.0.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10cf2939cd0d5077e1c41543e33e42099a49e96529f0bb924d78fcf54bf863ea
|
|
| MD5 |
b96e6bb14fef05b99ecfd239385f2cc6
|
|
| BLAKE2b-256 |
af244578db0544a5c8f11bb7ba23598e837743af3ac2ea88a4f5526f938c4334
|