Install the app:
Download Latest Release
- Unzip the file.
- Run
NPM_AutoCode_AI.exe(Windows) orpython main.py(Python 3.12+). - Enter your task in the input box (e.g., "Plot a sine wave").
- Click Generate & Execute.
- Watch logs and progress bar – AI generates, checks safety, executes, and fixes errors if needed.
Note: Requires Ollama with models codellama:7b-instruct and qwen2.5-coder:7b. Run ollama pull for them.
NPM AutoCode AI is a Python desktop app for automatic code generation and execution using AI. Describe tasks in plain English, and it uses NPMAI (custom LLM tools) to create, validate, and run Python scripts safely.
Built for non-technical users – turns ideas into working code without manual editing.
- Natural Language to Code: AI generates Python scripts from your description.
- Safety Check: Scans code for risks (e.g., file deletions, remote access) before running.
- Auto-Debug: If errors happen, AI fixes and retries using error logs.
- Live Logs & Progress: See real-time updates in GUI.
- Dependency Handling: Installs libraries via
subprocessin code. - Isolated Execution: Runs in safe namespace to protect your system.
- Memory Chains: Remembers task history for better fixes.
- Enter task → AI (
codellama:7b-instruct) generates code via NPMAI Ollama. - Safety AI (
qwen2.5-coder:7b) reviews: If risky, stops with warning. - Execute code in thread → If error, feed back to AI for fix → Retry loop.
- Success: Logs "Task Completed Successfully".
All in background (QThread) so UI stays responsive. Uses LangChain for prompts.
- Language: Python 3.12+
- GUI: PySide6 (QWidget, QThread, etc.)
- AI: npmai.Ollama + Memory; LangChain Core for prompts/parsers.
- Execution:
exec()in custom globals dict with error capture.
Sonu Kumar Ramashish (a.k.a. Bihar Viral Boy)
- Age: 14 | Student | TEDx Speaker | AI & Software Developer | DevOps Enthusiast
- Reach: 410K+ Facebook followers
- Location: Kota, Rajasthan
Part of NPMAI ecosystem for AI automation tools.
Fork, add features (e.g., more models), and PR. License: MIT.
Star if useful! 🚀
