scaffold.py usageΒΆ
This script is a one-shot project scaffolding tool. It is not installed. You download it and run it directly.
WorkflowΒΆ
1: Go to your new project dirΒΆ
cd ~/work/your-new-project
The project will be created relative to your current directory (or relative to the path you pass with --path).
2: Download the scaffold.pyΒΆ
curl -o scaffold.py \
https://raw.githubusercontent.com/queezz/aklab-howto/master/src/scaffold.py
No Git clone, no installation β just a single file.
3: Project propertiesΒΆ
This scaffold defines the following project properties:
- Creation path β
--pathoption; default is the current directory (.). The project is created at<path>/<name>. With--here, files go into<path>itself (no subdirectory). - In-place mode β
--herescaffolds into the target directory. Allowed only if the directory is empty or contains onlyscaffold.py,.gitignore, orREADME.md. With--git,scaffold.pyis added to.gitignoreso you can download β run once β leave the script out of the repo. - Project name β Used for the folder name (unless
--here),pyproject.toml, and the package undersrc/<package_name>. - Documentation β
--docsenables MkDocs structure (docs folder, mkdocs.yml, GitHub Pages workflow). - Git integration β
--gitinitializes a Git repository and includes the MkDocs build recipe in CI.
4: Run the scaffoldΒΆ
One canonical example:
python scaffold.py my-new-project \
--author "Montbell" \
--desc "How to hike" \
--docs \
--git
This creates ./my-new-project with a ready-to-use structure.
In-place (download, run, then delete script):
curl -o scaffold.py https://raw.githubusercontent.com/queezz/aklab-howto/master/src/scaffold.py
python scaffold.py my-new-project --here --docs --git
This scaffolds into the current directory; .gitignore will include scaffold.py.
Command-line optionsΒΆ
| Option | Description |
|---|---|
name |
Project name (positional, required) |
--path PATH |
Where to create the project (default: current directory .) |
--here |
Scaffold into the target directory (no <name> subdirectory) |
--author TEXT |
Project author (default: Your Name) |
--email TEXT |
Author email (default: you@example.com) |
--desc TEXT |
Short description (default: A short description.) |
--repo-url URL |
Repository URL (default: https://github.com/your/repo) |
--license {MIT} |
License type (default: MIT) |
--git |
Initialize Git repo and make first commit |
--docs |
Include MkDocs configuration and docs folder |
--overwrite |
Overwrite existing files if present |