Skip to main content

ForgePyGen

Generate complete, production-ready project structures using local AI models powered by Ollama.

ForgePyGen transforms natural language descriptions into fully scaffolded, ready-to-use projects — automatically creating folders, files, starter code, documentation, and configuration files. No cloud required. No API keys. Just pure local AI power.


Table of Contents


Why ForgePyGen?

Setting up a new project is repetitive. You create the same folders, write the same boilerplate, copy the same config files — every single time.

ForgePyGen eliminates that.

Describe what you want to build in plain English. ForgePyGen uses a local AI model to understand your intent and generate a complete, opinionated project scaffold in seconds — including starter code, a README, requirements files, and .gitignore.

Everything runs locally on your machine using Ollama. No data leaves your system. No subscriptions. No limits.


Features

Feature Description
AI-Powered Generation Understands natural language and generates intelligent project structures
Fully Local Powered by Ollama — no internet connection required after setup
Complete Scaffolding Creates folders, files, starter code, README, requirements, and .gitignore
Multi-Framework Support Works with Flask, Django, FastAPI, Data Science, CLI tools, and more
Simple Python API Single function call to generate an entire project
Fast & Lightweight Minimal dependencies, instant scaffolding
Privacy First Your project descriptions never leave your machine

Requirements

ForgePyGen requires Ollama to be installed and running on your machine.

1. Install Ollama

Download and install Ollama from the official website:

https://ollama.com

2. Download a Model

Pull the recommended model:

ollama pull llama3.2:3b

Tip: You can use any model supported by Ollama. Larger models (e.g., llama3.1:8b) produce richer scaffolds at the cost of speed.

3. Start Ollama

ollama serve

Ollama must be running in the background whenever you use ForgePyGen.


Installation

Install ForgePyGen via pip:

pip install forgepygen

Verify the installation:

python -c "import forgepygen; print('ForgePyGen ready!')"

Quick Start

Generate a complete project with a single function call:

import forgepygen

forgepygen.generate(
    "Create a Student Management System with admin, teacher, and student modules"
)

That's it. ForgePyGen will:

  1. Send your description to Ollama
  2. Receive a structured JSON project plan
  3. Create all folders and files on disk
  4. Return the generated project name

How It Works

Your Description
      │
      ▼
 ForgePyGen Client
      │
      ▼
 Ollama (Local LLM)
      │
      ▼
 JSON Project Blueprint
      │
      ▼
 File & Folder Creation
      │
      ▼
 Ready-to-Use Project

Step-by-Step

  1. You describe your project in plain English
  2. ForgePyGen sends the description to a locally running Ollama model
  3. The AI returns a structured JSON blueprint of the project
  4. ForgePyGen creates all folders, files, starter code, and documentation
  5. Your project is ready — open it in your editor and start building

Example

Input

import forgepygen

forgepygen.generate(
    "Create a Flask blog application with authentication, templates, static files, and database support"
)

Generated Output

Flask Blog Application/
│
├── templates/
│   ├── base.html
│   ├── index.html
│   ├── login.html
│   └── post.html
│
├── static/
│   ├── css/
│   └── js/
│
├── database/
│   └── models.py
│
├── app.py
├── config.py
├── requirements.txt
├── README.md
└── .gitignore

Note: The exact output varies based on your description and the AI model used. More detailed descriptions produce more detailed scaffolds.


Supported Project Types

ForgePyGen supports a wide range of project types out of the box:

  • Web Applications — Flask, Django, FastAPI
  • REST APIs — With authentication, routing, and database layers
  • Data Science Projects — Notebooks, pipelines, and model directories
  • Machine Learning Projects — Training scripts, model storage, evaluation
  • Automation Scripts — Task runners, schedulers, bots
  • CLI Applications — Argument parsing, command modules
  • Real-Time Applications — WebSocket-based chat and notification systems
  • E-Commerce Platforms — Product management, cart, and payment modules
  • Educational Projects — Management systems, grading tools
  • Custom Software Architectures — Describe anything; ForgePyGen adapts

Example Prompts

Hospital Management System

import forgepygen

forgepygen.generate(
    "Create a Hospital Management System with doctors, patients, appointments, and billing modules"
)

Data Science — Churn Prediction

import forgepygen

forgepygen.generate(
    "Create a Data Science project for customer churn prediction using Python"
)

E-Commerce with Flask

import forgepygen

forgepygen.generate(
    "Create an E-Commerce Website using Flask with authentication and product management"
)

Real-Time Chat App

import forgepygen

forgepygen.generate(
    "Create a Real-Time Chat Application using WebSockets"
)

Machine Learning Pipeline

import forgepygen

forgepygen.generate(
    "Create a machine learning pipeline for image classification using PyTorch with training, validation, and inference scripts"
)

API Reference

forgepygen.generate()

Generate a complete project structure from a natural language description.

forgepygen.generate(project_description)

Parameters

Parameter Type Required Description
project_description str Yes Plain English description of the project to generate

Returns

Type Description
str The name of the generated project directory on success

Example

import forgepygen

project_name = forgepygen.generate(
    "Create a REST API for a task manager with user authentication and CRUD operations"
)

print(f"Project created: {project_name}")

Raises

Exception Cause
ConnectionError Ollama is not running or unreachable
ModelNotFoundError The required model is not downloaded
GenerationError The AI failed to produce a valid project structure

Troubleshooting

Ollama is not running

Symptom: ConnectionError or Failed to connect to Ollama

Fix: Start Ollama in a terminal:

ollama serve

Model not found

Symptom: ModelNotFoundError or model 'llama3.2:3b' not found

Fix: Pull the model:

ollama pull llama3.2:3b

Project generation fails or produces incomplete output

Checklist:

  • Is Ollama running? (ollama serve)
  • Is the required model downloaded? (ollama list)
  • Is your project description clear and specific?
  • Does your machine have enough RAM for the model?

Tip: Try a more detailed description. Instead of:

forgepygen.generate("Create a web app")

Use:

forgepygen.generate(
    "Create a Flask web application with user login, a dashboard page, and a SQLite database"
)

Slow generation

Large models produce better output but are slower. For faster results, use the smaller model:

ollama pull llama3.2:3b

Contributing

Contributions are welcome!

How to Contribute

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/my-feature
  3. Commit your changes: git commit -m "Add my feature"
  4. Push to your branch: git push origin feature/my-feature
  5. Open a Pull Request

What We Welcome

  • Bug reports and fixes
  • New project type support
  • Improved prompt engineering
  • Documentation improvements
  • Feature requests via GitHub Issues

If you find ForgePyGen useful, consider starring the repository and sharing it with others. It helps the project grow!


License

MIT License

Copyright (c) 2024 Varanasi Teja

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

Author

Varanasi Teja

Developed with the belief that project setup should never slow you down.


ForgePyGen — Forge your projects. Generate your future.

Metadata

Release files for forgepygen 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for forgepygen 1.0.3
File Size Uploaded Provenance Actions
forgepygen-1.0.3.tar.gz 7.8 kB Without provenance Details for forgepygen-1.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for forgepygen 1.0.3
File Interpreter ABI Platform Actions
forgepygen-1.0.3-py3-none-any.whl Python 3 none any Details for forgepygen-1.0.3-py3-none-any.whl

Total release size: 16.2 kB

Release files / forgepygen-1.0.3.tar.gz

Download URL forgepygen-1.0.3.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9d8998445525bda792da779a85192aba6b77b26648d8fb94c68dd3984cd41e57
BLAKE2b-256 checksum
How to use checksums
8ee784d3b2488e020ab03c03b176137e0d75a35a47ed460632310dff87310b09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Release files / forgepygen-1.0.3-py3-none-any.whl

Download URL forgepygen-1.0.3-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45f1d5b626b963140c331b304f28c51e0a5311f5c88fae8aee2ac5bb2141096b
BLAKE2b-256 checksum
How to use checksums
6641ba869ba66bdd3f0b2592f252dc34337f37926f6fa845d185571cd6bf509d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.6

Security for forgepygen 1.0.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page