Skip to main content

Interactive MaaHelper for code assistance, analysis, and bug fixing with internet access

Project description

๐Ÿ™ MaaHelper v0.0.3

Modern Enhanced CLI with Multi-Provider AI Support

Created by Meet Solanki (AIML Student)

PyPI version Python 3.8+ License: MIT

โœจ 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>/.maahelper/
  • ๐Ÿ’ฌ 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
maahelper

# Or run via Python
python -m maahelper.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>/.maahelper/config.json

You can manage, edit, or delete keys via the Rich UI manager:

maahelper-keys

๐ŸŽฏ Core Commands

Basic

  • help โ€” Show help
  • exit, quit, bye โ€” Exit
  • clear โ€” Clear history
  • status โ€” Show config

File

  • file-search <filepath> โ€” AI file analysis
  • files โ€” Show files
  • dir โ€” Show directory

Config

  • providers โ€” List providers
  • models โ€” 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
Google 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}\.maahelper\
โ”œโ”€โ”€ 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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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)

๐Ÿ™ 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

maahelper-0.0.3.tar.gz (34.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maahelper-0.0.3-py3-none-any.whl (32.9 kB view details)

Uploaded Python 3

File details

Details for the file maahelper-0.0.3.tar.gz.

File metadata

  • Download URL: maahelper-0.0.3.tar.gz
  • Upload date:
  • Size: 34.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for maahelper-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2ec855fccb56e9e84dc21f8191b7eaf5dc0bea9dacc29bc428b1dd4a3d417729
MD5 d9d06962763835e66f483933959f9af9
BLAKE2b-256 a7e890808e83807636db15ffa827a66f2b149069b426a8ca96fdb87b07d52114

See more details on using hashes here.

File details

Details for the file maahelper-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: maahelper-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 32.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.2

File hashes

Hashes for maahelper-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1e53f35adc1968b0f6c86cb9d4552f6d201f67e7a087d248cf2c1c1dae0de6e4
MD5 2361def4a92fb65145113c7ae97fd3e6
BLAKE2b-256 384f4bd3d5eeba9c83302b1f0bc63ae6e09637e161c65afecbd9301a6b4a469c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page