A fast Python project generator for basic, API, and SaaS projects.
Project description
Forge
Forge is a Python CLI tool for generating clean project structures, APIs, SaaS backends, and modules faster.
Built with:
- Python
- Typer
- Rich
Features
- Interactive terminal menu
- Create Python projects
- Create API projects
- Create SaaS backend projects
- Create modules inside existing projects
- Optional router generation
- Optional test generation
- Optional CRUD starter generation
- Automatic virtual environment creation
- Automatic pip upgrade
- Automatic dependency installation
- Safe
requirements.txtupdate without duplicates
Installation
Clone the repository:
git clone https://github.com/YOUR_USERNAME/vylyv-forge.git
cd vylyv-forge
Install dependencies:
python -m pip install -r requirements.txt
Install Forge locally:
python -m pip install -e .
Usage
Start Forge with the interactive menu:
forge
You will see:
1 - Create project
2 - Create module
3 - Show help
0 - Exit
Create a project
Interactive mode:
forge
Direct command:
forge create my_project
Create a basic Python project:
forge create my_project --template basic
Create an API project:
forge create my_api --template api
Create a SaaS backend project:
forge create my_saas --template saas
Short option:
forge create my_saas -t saas
Available templates
Basic
A simple Python project structure.
my_project/
├── README.md
├── requirements.txt
├── src/
│ ├── __init__.py
│ └── main.py
└── tests/
├── __init__.py
└── test_main.py
API
A FastAPI starter project.
my_api/
├── README.md
├── requirements.txt
├── .env.example
├── src/
│ ├── main.py
│ ├── api/
│ ├── core/
│ ├── schemas/
│ └── services/
└── tests/
Run the API:
uvicorn src.main:app --reload
SaaS
A SaaS backend architecture starter.
my_saas/
├── README.md
├── requirements.txt
├── .env.example
├── logs/
├── src/
│ ├── app.py
│ ├── core/
│ ├── database/
│ ├── modules/
│ ├── routers/
│ └── shared/
└── tests/
Run the SaaS backend:
uvicorn src.app:app --reload
Create a module
Go inside a generated project:
cd my_saas
Create a module:
forge module users
Create a module with router:
forge module users --with-router
Create a module with router and tests:
forge module users --with-router --with-tests
Create a module with CRUD starter files:
forge module users --with-router --with-tests --crud
Do not update requirements.txt:
forge module users --no-requirements
Module structure
Example:
forge module clients --with-router --with-tests --crud
Creates:
src/modules/clients/
├── __init__.py
├── dto/
│ ├── __init__.py
│ └── create_clients_dto.py
├── repository/
│ ├── __init__.py
│ └── clients_repository.py
├── service/
│ ├── __init__.py
│ ├── clients_service.py
│ └── clients_crud_service.py
└── validators/
├── __init__.py
└── clients_validator.py
Also creates:
src/routers/clients_router.py
tests/test_clients.py
Options
Project command
forge create NAME
Options:
--template, -t Choose template: basic, api, saas
--no-venv Do not create virtual environment
--no-install Do not install dependencies
Example:
forge create demo_api -t api --no-install
Module command
forge module NAME
Options:
--with-router Create router file
--with-tests Create test file
--crud Create CRUD starter files
--no-requirements Do not update requirements.txt
Example:
forge module orders --with-router --with-tests --crud
Development
Install locally in editable mode:
python -m pip install -e .
Run help:
forge --help
Run interactive menu:
forge
Requirements
Forge requires Python 3.10 or higher.
Main dependencies:
typer
rich
Roadmap
Planned features:
- Add database migration generator
- Add router registration automation
- Add service/repository CRUD templates
- Add Docker template
- Add authentication starter
- Add
.envsetup helper - Add project config file
- Add plugin system
- Add update command
License
MIT License.
Author
Created by Vylyv.
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 vylyv_forge-0.1.0.tar.gz.
File metadata
- Download URL: vylyv_forge-0.1.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e7c51a3aff90457774d6b11feaf582effb8febd6b42026b5a20bda85e7421c7
|
|
| MD5 |
915cf6ae8503e47d0540122efb14e835
|
|
| BLAKE2b-256 |
63dcab0a7158544cb775b46c25b3a05f11c379cabfa61afff46bdc72b2708bf5
|
File details
Details for the file vylyv_forge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: vylyv_forge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16355a21423f3546907434afae522b57ce15fa9ce1f460dcf11c1a158a11d4d0
|
|
| MD5 |
ae66915d8b38d284db25f0ded50fc177
|
|
| BLAKE2b-256 |
7bf493612d49b31300a9bb416bf1793260bd7c4533919c84582871435b0d2856
|