This project is a CLI AI Agent designed for macOS, combining the power of local GGUF models (via llama-cpp-python) or OpenAI's GPT API to generate safe and useful Shell or Python code based on user prompts.
The agent is built with Flask for REST API support and has a built-in logging and task execution system.
β
Supports Local LLMs and OpenAI API
β
Secure Mac Password Handling (with sudo support)
β
Automatic GGUF Model Downloads & Validation
β
Interactive Model Selection
β
Safe Code Generation: Outputs raw Shell/Python code based on tasks
β
Execute or Log Code Outputs
β
Retry on Errors with AI-Generated Fixes
β
Flask REST API with /task, /run_file, /perf, /toggle_long_mode endpoints
β
Logging and Error Handling
β
Long Context Mode for large tasks and partial completions
These are automatically installed on first run:
llama-cpp-pythonflaskhuggingface_hub- (Optional)
openai(for GPT-4/3.5 access)
1οΈβ£ Clone or download this repo.
2οΈβ£ Install GitHub CLI (optional for managing repos).
3οΈβ£ Run the agent:
python script.py