Interactive MaaHelper for code assistance, analysis, and bug fixing with internet access
Project description
๐ MaaHelper v0.0.2
Modern Enhanced CLI with Multi-Provider AI Support
Created by Meet Solanki (AIML Student)
โจ Features
- ๐จ Rich CLI: Real-time streaming, beautiful panels, markdown/code rendering
- ๐ค Multi-Provider AI: OpenAI, Groq, Anthropic, Google, Ollama
- ๐ AI File Analysis:
file-search <filepath>for code/data/doc files - ๐ Secure API Key Management: Local encrypted storage in
C:/Users/<username>/.ai_helper_agent/ - ๐ฌ Interactive Chat: Persistent conversation history, context-aware
- ๐ Async Performance: Fast streaming, low memory, instant startup
- ๐ Live Stats: Session, file, and model metrics
๐ Quick Start
Installation
pip install maahelper
Usage
# Start the CLI
ai-helper
# Or run via Python
python -m ai_helper_agent.cli.modern_enhanced_cli
API Key Setup
On first run, you'll be prompted to enter API keys for Groq, OpenAI, etc. These are securely stored in:
C:/Users/<username>/.ai_helper_agent/config.json
You can manage, edit, or delete keys via the Rich UI manager:
ai-helper-keys
๐ฏ Core Commands
Basic
helpโ Show helpexit,quit,byeโ Exitclearโ Clear historystatusโ Show config
File
file-search <filepath>โ AI file analysisfilesโ Show filesdirโ Show directory
Config
providersโ List providersmodelsโ List models
๐ค Supported AI Providers
| Provider | Models | Notes |
|---|---|---|
| Groq | Llama 3.1, Llama 3.2, Mixtral, Gemma | โก Fastest & Free |
| OpenAI | GPT-4, GPT-3.5-turbo | ๐ง Most capable |
| Anthropic | Claude 3, Claude 2 | ๐ Great for analysis |
| Gemini Pro, Gemini Flash | ๐ Multimodal support | |
| Ollama | Local models | ๐ Privacy-focused |
๐ File Analysis Example
You: file-search src/main.py
๐ค AI Assistant
Analyzing your Python file...
File Analysis: src/main.py
File Type: Python Source Code
Size: 1.2KB
Language: Python 3.8+
### Key Components:
- Main Function: Entry point with argument parsing
- Error Handling: Comprehensive try-catch blocks
- Dependencies: requests, json, argparse
### Code Quality:
โ
Good Clean structure and readable code
โ ๏ธ Suggestion: Add type hints for better maintainability
โ ๏ธ Suggestion: Consider adding docstrings
### Recommendations:
1. Add input validation for user arguments
2. Implement logging for better debugging
3. Consider async/await for API calls
๐จ Rich CLI Features
- Live Streaming: See AI responses in real-time
- Syntax Highlighting: Code blocks with proper formatting
- Progress Indicators: Visual feedback for operations
- Interactive Menus: Beautiful provider and model selection
- Error Handling: Elegant error messages with helpful suggestions
๐ง Configuration
API Key Management
MaaHelper uses a secure local configuration system:
C:\Users\{username}\.ai_helper_agent\
โโโ config.json # Encrypted API keys
โโโ conversation_history/ # Chat sessions
โโโ logs/ # Application logs
Environment Variables
# Recommended method
export GROQ_API_KEY="gsk_..."
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GOOGLE_API_KEY="AIza..."
๐ Performance
- Streaming Speed: Up to 500+ tokens/second with Groq
- Memory Usage: < 50MB typical usage
- Startup Time: < 2 seconds cold start
- File Analysis: Processes files up to 10MB
๐ ๏ธ Development
Requirements
- Python 3.8+
- Rich >= 13.0.0
- OpenAI >= 1.0.0
- Cryptography >= 3.4.0
Installation for Development
git clone https://github.com/AIMLDev726/maahelper.git
cd maahelper
pip install -e .
๐ Examples
Basic Chat
You: Explain async/await in Python
๐ค AI Assistant
# Async/Await in Python
**Async/await** is Python's way of handling asynchronous programming...
File Analysis
You: file-search requirements.txt
๐ค AI Assistant
## Dependency Analysis
Your project has **12 dependencies**:
- **Core**: openai, rich, cryptography
- **Optional**: anthropic, google-generativeai
- **Development**: pytest, black, flake8
Code Review
You: Review this function for bugs
๐ค AI Assistant
## Code Review Results
โ
**Good Practices**:
- Clear function naming
- Proper error handling
โ ๏ธ **Issues Found**:
- Missing input validation on line 15
- Potential memory leak in loop (line 23)
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
๐ License
This project is licensed under the MIT License - see the LICENSE file for details.
๐จโ๐ป Author
Created by Meet Solanki (AIML Student)
- GitHub: @AIMLDev726
- Email: aistudentlearn4@gmail.com
๐ Acknowledgments
- Built with Rich for beautiful CLI
- Powered by OpenAI and multiple AI providers
- Thanks to the open-source Python community
โญ Star this repository if you find it helpful!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file maahelper-0.0.2.tar.gz.
File metadata
- Download URL: maahelper-0.0.2.tar.gz
- Upload date:
- Size: 33.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83ce849caa3665d4112e13c17a43926a96ad2f20e3646ad32ebba92b4d3685d5
|
|
| MD5 |
c8cc9970cd3efd8f86d02783be5093af
|
|
| BLAKE2b-256 |
eb5069891d9078397703fd7309a813a3d2d1078e3158b1ecd7181bcea7abbf85
|
File details
Details for the file maahelper-0.0.2-py3-none-any.whl.
File metadata
- Download URL: maahelper-0.0.2-py3-none-any.whl
- Upload date:
- Size: 32.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37ccf7a8c0d398102ebb6575e3fc255a9bc0bfbd4e6f13ffddf027605e3d0927
|
|
| MD5 |
9c7a72f4335403bcede2210646727ed7
|
|
| BLAKE2b-256 |
8c94c5e1aa57e74e00582dc460aa4afe332b7ca299a4587e8551cadf10c5a690
|