CLI tool for scaffolding FastAPI projects and creating modular app structures.
Project description
Proto Craft
A CLI tool for rapidly creating and managing development projects with FastAPI boilerplate templates and modular app structures.
Overview
Proto Craft streamlines the process of scaffolding new FastAPI-based projects and creating self-contained app modules within those projects. It provides automated setup with configurable Python versions and maintains a clean directory structure.
Features
- ๐ Project Creation: Clone and initialize FastAPI boilerplate projects
- ๐ฆ App Scaffolding: Create modular app structures with predefined file templates
- ๐ Project Inspection: Verify app structure and create missing files
- ๐ Python Version Control: Support for Python 3.10 - 3.15
- ๐ Configuration Management: builder.ini-based project configuration
Installation
Prerequisites
- Python >= 3.12
- Git
uvpackage manager (recommended)
From Source
git clone https://github.com/tinspj1997/proto-craft.git
cd proto-craft
uv sync
Install as Package
pip install proto-craft
# or with uv
uv pip install proto-craft
Quick Start
Create a New Project
proto-craft create project
Follow the interactive prompts:
- Enter your project name
- Specify the required Python version (3.10-3.15, default: 3.12)
The tool will:
- Clone the FastAPI boilerplate repository
- Remove the .git directory for a fresh start
- Create
builder.iniconfiguration - Set up
.python-versionfile
Navigate to Your Project
cd your-project-name
uv sync
Create an App Inside the Project
proto-craft create app
Provide the app name when prompted. This creates:
src/app/your-app-name/
โโโ __init__.py
โโโ routes.py
โโโ schema.py
โโโ service.py
Inspect Project Apps
Verify the structure of all apps in your project:
proto-craft inspect
Create missing files automatically:
proto-craft inspect --add
Display Version
proto-craft version
Configuration
builder.ini
Located in the project root, contains project metadata:
[project]
name = your-project-name
version = 1.0.0
python_version = 3.12
app_path = src/app
- app_path: Directory where new apps are created (relative to project root)
.python-version
Specifies the project's Python version for tools like pyenv or uv.
Project Structure
your-project-name/
โโโ .python-version # Python version specification
โโโ builder.ini # Project configuration
โโโ src/
โ โโโ app/
โ โโโ your-app-name/ # New apps created here
โ โโโ __init__.py
โ โโโ routes.py
โ โโโ schema.py
โ โโโ service.py
โโโ main.py
โโโ [other project files]
Environment Variables
PROTO_CRAFT_PASSKEY
Optional environment variable for authentication:
export PROTO_CRAFT_PASSKEY="your-passkey"
proto-craft create project
If not set, you'll be prompted for the passkey interactively.
Development
Requirements
- Python 3.12+
- Dependencies:
typer,rich
Install Development Dependencies
cd proto-craft
uv sync --all-extras
Run Commands
# Development mode
uv run proto-craft --help
# Or install in editable mode
pip install -e .
proto-craft --help
Troubleshooting
builder.ini not found
Ensure you're running commands from the project root directory created by the tool.
cd /path/to/your/project
proto-craft inspect
app_path not configured
Edit your builder.ini and verify the [project] section contains an app_path entry.
Git clone fails
- Check your internet connection
- Verify the repository URL in
instructions.py - Ensure git is installed and accessible
Python version validation error
Specify a Python version between 3.10 and 3.15:
proto-craft create project
# When prompted: Enter a version like 3.12
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Make your changes with proper type hints
- Run tests (when available)
- Submit a pull request
License
See LICENSE file in the repository.
Author
Tins P Joseph
- Email: tinspj1997@gmail.com
- GitHub: @tinspj1997
Related Projects
- FastAPI Boilerplate - The template used for project creation
Support
For issues, questions, or suggestions:
- ๐ Open an issue on GitHub
- ๐ง Email the author
- ๐ฌ Check existing documentation
Last Updated: March 2025
Version: 0.1.0
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 proto_craft-0.1.0.tar.gz.
File metadata
- Download URL: proto_craft-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f6963f0270432eb8b7a9a5718ad50e5e06e4394cb275cea18f5a4ff823c9345
|
|
| MD5 |
3c10ee6bb3a6f81e2f3a1fdfbf960972
|
|
| BLAKE2b-256 |
c699f95d06c6560dd796fd7bbf9c9929518e4e98eeaf5950650f2ced1d7b0066
|
File details
Details for the file proto_craft-0.1.0-py3-none-any.whl.
File metadata
- Download URL: proto_craft-0.1.0-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.17
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cea50b19ed4be7dd27004afc7685be8c8e6a2d1e7c6fdcf763f9624d23e8a5c
|
|
| MD5 |
19bf1cd301f07134e28401c22642411b
|
|
| BLAKE2b-256 |
c6f596f3758e7e3e386a4be5102b2a7fe5e4082201161083ad2ddab3ec4af6b9
|