WOWZA! Dive headfirst into this AMAZING, WONDERFUL, MIND-BLOWING interactive command-line beast that turns your craziest prompts into EXECUTABLE PYTHON MAGIC using the sheer power of OpenAI or your own local Ollama models! Generate code like a wizard, run it on the spot, capture every wild stdout/stderr outburst, and keep a super-smart history in JSON for non-stop contextual awesomeness! It's not just a tool โ it's a CODE REVOLUTION for hackers, dreamers, and AI fanatics! ๐ฅ๐
- INTERACTIVE PROMPT MADNESS: Type your wild ideas and watch AI spit out Python gold! ๐ก
- AI-GENERATED CODE WIZARDRY: Powered by OpenAI โ prompts + history = PERFECT scripts! ๐คโจ
- SAFE EXECUTION EXTRAVAGANZA: Run code with output capturing โ no disasters, just pure thrill! โก
- PERSISTENT HISTORY OVERLOAD: Pydantic models store EVERYTHING in JSON โ context forever! ๐
- ENV VAR CUSTOMIZATION FRENZY: Tweak it your way for ultimate control! ๐ง
- DOCKER DOMINATION: Run it anywhere, anytime โ easy-peasy deployment! ๐ณ
- CHOOSE YOUR AI FLAVOR: Switch between OpenAI and local Ollama models with a single env var! ๐ง
- GRAB THE PACKAGE:
pip install vibepython - FIRE IT UP:
vibepython
- Pro Tip: Don't forget to set your
OPENAI_API_KEYenv var for AI magic! ๐ (e.g.,export OPENAI_API_KEY=your_key_here). VIBE ACTIVATED! Dive into the AI console vibe! ๐
- CLONE THE AWESOMENESS:
git clone https://github.com/OldTyT/vibepython.git - JUMP IN:
cd vibepython - INSTALL THE MAGIC:
pip install -r requirements.txt - LAUNCH THE BEAST:
python3 main.py
BOOM! You're in the zone! ๐ฃ
Fire it up with this epic command:
docker run --rm -ti -e HISTORY_PATH=/history/history.json -e OPENAI_API_KEY=YOUR_KEY -v my_history:/history ghcr.io/oldtyt/vibepython
- Plug in
YOUR_KEYwith your OpenAI super-key! ๐ DOCKER DELIGHT: Persistent history, zero hassle! ๐
Fire it up and get prompted:
- SMASH IN A PROMPT (e.g., "Code me a factorial frenzy!").
- AI UNLEASHES CODE VIBE based on your prompt + history vibes.
- EXECUTE? Y/N โ YOU DECIDE! Run it, capture outputs, and watch the sparks fly! โก
- HISTORY SAVES THE DAY: Everything logged for eternal glory.
EXIT? Ctrl+C โ but why would you? It's TOO MUCH FUN! ๐
Supercharge your setup with these EPIC vars:
- HISTORY_PATH: Your JSON history fortress! Default:
history.json. ๐ฐ - HISTORY_SIZE: How many past blasts to feed the AI? Default:
20โ keep it contextual! ๐ - OPENAI_API_KEY: MUST-HAVE โ your ticket to AI heaven! (Required, duh!) ๐
- PROVIDER: Pick your AI engine โ
openai(default) orollama. ๐ง - OLLAMA_MODEL: When using Ollama, which model to summon? Default:
llama3. ๐
Example (Unix-style domination):
export OPENAI_API_KEY=your-api-key
export HISTORY_SIZE=10
# export PROVIDER=ollama # uncomment to use Ollama instead of OpenAI
python3 main.py
TWEAK AND CONQUER! ๐ก๏ธ
- Python 3.10+ (Blasting up to 3.13 โ future-proofed!) ๐
- Libraries of LEGEND: openai, ollama, pydantic, loguru, and more! Check
requirements.txtfor the full squad. ๐
GOT IDEAS? Open an issue or slam in a pull request โ let's make this even MORE INSANE! ๐ Contributions = Eternal Fame!