A lightweight, console-based Python application designed to streamline development workflows by integrating AI-driven code generation with robust project management. Optimized for systems with limited resources, it offers a modular architecture, a flexible template system, and seamless project tracking, making AI-assisted coding accessible and efficient.
- Console-Based Interface: A universal text-based CLI that runs on virtually any system.
- Multi-File Operations: Load, edit, and save multiple files at once with wildcard support (e.g.,
load src/*.py
). - Advanced Templating: Use dynamic placeholders (
{{task}}
,{{file_contents}}
, etc.) to build precise, context-aware prompts for the AI. - Smart Project Tracking: All project files, metadata, and descriptions are tracked in a central
project.json
file. - Multi-Provider AI Support: Seamlessly switch between AI providers like local Ollama models, cloud-based OpenRouter models, or a 'fake' provider for offline work and testing.
- Robust File Handling: Includes automatic change detection, directory creation, and the ability to apply AI-generated diff patches.
- Intelligent Response Parsing: Automatically extracts structured data (files, code, descriptions) from AI responses, with smart fallbacks for various formats.
- Comprehensive Logging: Detailed logs for all major operations, ensuring full traceability and easier debugging.
- Self-Regeneration: Version 1.1 of the tool was autonomously generated by version 1.0 using Google's "Gemini 2.5 Pro Preview 06-05" model, showcasing its ability to evolve itself.
- Python 3.8 or higher
- An API key for OpenRouter (if used), set as an environment variable:
OPENROUTER_API_KEY
- A running Ollama instance (if used)
-
Clone the repository:
git clone https://github.com/your-username/poor-ai-programming-tool.git cd poor-ai-programming-tool
-
Set up a virtual environment:
python -m venv venv # On Windows venv\Scripts\activate # On macOS/Linux source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Configure the tool:
- Edit
models.json
and configure your desired AI models. - Edit
config.json
and adjust settings like the text editor for viewing requests.
- Edit
To start the application, point it to a project folder. If the folder doesn't exist, the tool will help you create it.
python poor_ai.py --project-folder /path/to/your/project
You will now be in the interactive CLI.
The tool operates through a simple set of commands in its interactive console.
-
Load files: Load the files you want the AI to work on.
> load src/main.py src/utils.py
Or use wildcards:
> load src/*.py
-
Define the task: Describe what you want the AI to do. You can enter multi-line text; type
END
on a new line to finish.> task Please add a function to utils.py called 'calculate_sum' that takes a list of numbers and returns their sum. Then, import and call this function in main.py. END
-
Generate code: Run the generation command. The tool will build a prompt, send it to the AI, and apply the response.
> gen
-
Save changes: If you are satisfied with the changes, save them to disk.
> save
-
Create custom dev guide: Edit file from 'docs/' folder, let it be
DevGuide_v1.2.md
with new features. -
Create empty project:
python poor_ai.py --project-folder <new_folder>
- Copy dev guide into
<new_folder>/DevGuide_v1.2.md
- Copy dev guide into
-
Generate project:
> project set-name Poor AI Programming Tool v 1.2 > model list > model use 1 > template use guide > load DevGuide_v1.2.md > context show > gen > save
-
Update project files:
> clear > template use main > load poor_ai.py core/model_manager.py > task Fix error: .... > context show > gen > save
Command | Description |
---|---|
load <files...> |
Load one or more files into the context (wildcards supported). |
save |
Save changes from the buffer to the actual files. |
clear |
Clear all loaded files from the buffer. |
task <description> |
Set the task for the AI. Use task alone for multi-line input. |
gen |
Generate code based on the current context, files, and task. |
context show |
Display the exact prompt that will be sent to the AI. |
template list/use/show/new/edit |
Manage prompt templates. |
model list/use <name_or_index> |
List available AI models or switch the active one. |
project set-name <new_name> |
Set the project's name in project.json . |
test |
Run pytest in the tests/ directory. |
version |
Show the application's version. |
help |
Show the help message. |
exit / quit |
Exit the application. |
poor_bench
is a Python-based benchmarking framework designed to create, manage, and evaluate tests for Large Language Models (LLMs). It allows developers to define test classes with customizable prompt templates, generate tests across multiple difficulty levels, and evaluate results using modular evaluation components. The framework supports tailored prompts per LLM, initial test validation, and bulk test execution, with results scored on a 0.0 to 1.0 scale. Optimized for constrained systems, it operates as a standalone module within the poor_ai
ecosystem, focusing on catching potential LLM issues early in development.
Check out the sample model comparison chart:
Contributions are welcome! If you have suggestions for improvements or want to add new features, please feel free to open an issue or submit a pull request.
- Fork the repository.
- Create a new branch (
git checkout -b feature/YourFeature
). - Commit your changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature/YourFeature
). - Open a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.