Skip to main content

AI-powered project generator that creates complete project structures from natural language descriptions using local Ollama models.

Project description

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.

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

forgepygen-1.0.2.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

forgepygen-1.0.2-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file forgepygen-1.0.2.tar.gz.

File metadata

  • Download URL: forgepygen-1.0.2.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for forgepygen-1.0.2.tar.gz
Algorithm Hash digest
SHA256 d30ef662c5821756111278af8e89815129128ec926bd84d97c2eb8a10a5aead7
MD5 43c3568c6885dfbfb3d956a97c954d00
BLAKE2b-256 ceea36e16173ddd35f1a40f7125e4df94c3a632b87a7e033749707b6016a99e7

See more details on using hashes here.

File details

Details for the file forgepygen-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: forgepygen-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for forgepygen-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ec52b4cef86c2793bb0a3c9ef6875591442471736cb74ad3f95dbdf50cb7b5e4
MD5 5510cedf2584b18979b05cc4a1062f8f
BLAKE2b-256 686d4464d7b0f737594285e644aceaa38e3fab47fd04404c901aadf328310f8d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page