Metadata-Version: 2.4
Name: codeforge-genai-agent
Version: 0.1.5
Summary: AI-powered coding agent with self-healing, memory, and CLI
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: typer
Requires-Dist: rich
Requires-Dist: langgraph
Requires-Dist: openai
Requires-Dist: chromadb

# 🚀 CodeForge GenAI Agent

An AI-powered autonomous coding agent that can **generate, execute, debug, and improve code** — with memory, safety, and an interactive CLI.

---

## ✨ What is CodeForge?

CodeForge is not just a code generator — it is an **agentic system** that behaves like a developer:

- Understands intent  
- Chooses tools  
- Writes code  
- Executes it  
- Fixes errors  
- Learns from failures  
- Interacts with users  

It combines **LLMs + tool execution + memory + safety layers** into a single CLI experience.

---

## 🔥 Core Capabilities

### 🧠 Intelligent Code Generation
- Generates complete, executable Python programs  
- No placeholders or incomplete snippets  

### ⚙️ Execution Engine
- Automatically runs generated code  
- Captures stdout and errors  

### 🔁 Self-Healing Loop
- Detects runtime errors  
- Sends feedback to LLM  
- Fixes and retries automatically  

### 💾 Persistent Memory
- **Input Memory** → remembers user inputs  
- **Failure Memory** → remembers fixes for past errors  

### 💬 Interactive CLI
- Detects `input()` in code  
- Prompts user dynamically  
- Falls back to auto-input if needed  

### 🛡️ Safety Layer
- Classifies actions (LOW / MEDIUM / HIGH risk)  
- Requires user confirmation for risky operations  

### 🔍 RAG (Retrieval-Augmented Generation)
- Uses local project context  
- Improves relevance of generated solutions  

---

## 🧠 System Architecture

User Input → LLM → Intent → Tool → Policy → Execution → Error → Self-Heal → Memory → Output

---

## 📦 Installation

pip install codeforge-genai-agent

---

## 🔑 Setup OpenAI API Key

CodeForge requires an OpenAI API key to function.

### Windows (CMD / Anaconda Prompt)
set OPENAI_API_KEY=your_api_key_here

### Windows (PowerShell)
$env:OPENAI_API_KEY="your_api_key_here"

### macOS / Linux
export OPENAI_API_KEY=your_api_key_here

---

## ✅ Verify Setup

echo %OPENAI_API_KEY%        (Windows CMD)  
echo $env:OPENAI_API_KEY    (PowerShell)  
echo $OPENAI_API_KEY        (Mac/Linux)

---

## 🚀 Usage

codeforge

---

## 👤 Author

Rajeev Ghosh
