MERO 0.1.0
MERO AI Project
License: MIT
Requires Python: >=3.6.0
Keywords: AI, Python, MEROAI, ML, Code

![MEROAI Logo](MEROAI.png)

# MEROAI v1.0.0

**AI Programming Assistant for Code Analysis, Correction, and Generation**

Developed by **MERO** | GitHub: [@6x-u](https://github.com/6x-u) | Telegram: [@QP4RM](https://t.me/QP4RM)

---

## About MEROAI

MEROAI is a powerful AI programming assistant that helps developers analyze, fix, and understand code across multiple programming languages. Built with performance and accuracy in mind, MEROAI provides instant code analysis, error detection, and automatic corrections.

---

## Features

| Feature | Description |
|---------|-------------|
| Code Analysis | Detect syntax errors, mismatched brackets, and common issues |
| Auto-Fix | Automatically fix detected code problems |
| Multi-Language | Support for 10+ programming languages |
| Image Analysis | Analyze code screenshots and images |
| Script Generation | Generate Python scripts on demand |
| Device Info | Get detailed system information |
| Cross-Platform | Works on Windows, Linux, macOS, and Android |

---

## Supported Programming Languages

| Language | Extensions | Features |
|----------|------------|----------|
| Python | `.py` | Full analysis, fix, comment removal |
| C | `.c`, `.h` | Analysis, bracket checking |
| C++ | `.cpp`, `.cc`, `.cxx`, `.hpp` | Analysis, bracket checking |
| C# | `.cs` | Analysis, bracket checking |
| Java | `.java` | Analysis, bracket checking |
| JavaScript | `.js`, `.jsx` | Analysis, bracket checking |
| TypeScript | `.ts`, `.tsx` | Analysis, bracket checking |
| Go | `.go` | Analysis, bracket checking |
| Rust | `.rs` | Analysis, bracket checking |
| Bash | `.sh`, `.bash` | Analysis, comment removal |

---

## Supported Text Languages

MEROAI understands commands in multiple languages:

| Language | Example Commands |
|----------|------------------|
| English | who are you, help, create script |
| Arabic | من انت، مساعدة، اصنع سكربت |

---

## System Requirements

- Python 3.6 - 3.15
- Pillow (for image analysis)
- Works on: Windows, Linux, macOS, Android

---

## Installation

### Basic Installation
```bash
pip install MEROAI
```

### Full Installation (with all features)
```bash
pip install MEROAI[full]
```

### Development Installation
```bash
git clone https://github.com/6x-u/MEROAI
cd MEROAI-1V
pip install -e .
```

---

## Web Server (Browser Chat)

MEROAI includes a web server that allows you to chat with the AI from your browser!

### Start Web Server
```bash
python -m MEROAI.web_server
```

Or in Python:
```python
from MEROAI.web_server import run_server
run_server(host='0.0.0.0', port=5000)
```

### Features
- Chat with MEROAI in browser
- Upload files for analysis (Python, C++, images)
- Generate scripts (Python, C++)
- View device information
- Arabic and English support

### API Endpoints
| Endpoint | Method | Description |
|----------|--------|-------------|
| `/` | GET | Web chat interface |
| `/chat` | POST | Send message to MEROAI |
| `/upload` | POST | Upload file for analysis |
| `/api/info` | GET | Get device information |
| `/api/analyze` | POST | Analyze code |

---

## Usage

### Command Line Interface (CLI)

Start MEROAI:
```bash
meroai
```

Show version:
```bash
meroai --version
```

Show help:
```bash
meroai --help
```

Analyze a file:
```bash
meroai analyze path/to/file.py
```

Fix a file:
```bash
meroai fix path/to/file.py
```

---

## CLI Commands

| Command | Description |
|---------|-------------|
| `help` | Show all available commands |
| `info` | Show MEROAI introduction |
| `credits` | Show developer information |
| `analyze <path>` | Analyze code file for errors |
| `fix <path>` | Auto-fix code file |
| `image <path>` | Analyze image file |
| `convert <src> <dst>` | Convert file format |
| `create script` | Generate a Python script |
| `system` | Show system information |
| `device` | Show detailed device information |
| `exit` | Exit MEROAI |

---

## Questions MEROAI Can Answer

| Question Type | Examples |
|--------------|----------|
| Identity | "Who are you?", "What is your name?", "من انت" |
| Developer | "Who made you?", "Who is your developer?", "من مطورك" |
| Languages | "What languages do you support?", "اللغات" |
| Help | "How to use?", "help", "مساعدة" |
| Script | "Create script", "Make Python script", "اصنع سكربت" |

---

## Python API Usage

### Basic Chat
```python
from MEROAI.meroai import MEROAI

ai = MEROAI()
ai.chat()
```

### Code Analysis
```python
from MEROAI.meroai import MEROAI

ai = MEROAI()
result = ai.analyze_code("def foo(): return")
print(result)
```

### Image Analysis
```python
from MEROAI.meroai import MEROAI

ai = MEROAI()
result = ai.analyze_image("screenshot.png")
print(result)
```

### Auto-Fix Code
```python
from MEROAI.meroai import MEROAI

ai = MEROAI()
fixed = ai.fix_code("def foo( return")
print(fixed)
```

### Get Device Info
```python
from MEROAI.commands.meroai_cli import get_device_info

info = get_device_info()
for key, value in info.items():
    print(f"{key}: {value}")
```

### Generate Script
```python
from MEROAI.commands.meroai_cli import generate_script

script = generate_script()
print(script)
```

---

## CLI Interface Examples

### Interactive Session
```
MEROAI> who are you
I am MEROAI, an AI programming assistant developed by MERO. Contact: Telegram: @QP4RM

MEROAI> analyze mycode.py
Language: python
Errors: 0

MEROAI> create script
Here is a Python script created by MEROAI...

MEROAI> device
Device Information:
  OS: Linux
  Platform: Linux-5.15.0
  Python: 3.11.0
  ...
```

---

## Utilities

### Remove Comments from Files
```bash
python scripts/remove_comments.py ./src
```

---

## Project Structure

```
MEROAI-1V/
├── MEROAI.png              # Logo
├── README.md               # This file
├── setup.py                # Installation script
├── pyproject.toml          # Project configuration
├── src/
│   └── MEROAI/
│       ├── __init__.py
│       ├── commands/
│       │   └── meroai_cli.py   # CLI implementation
│       └── meroai/
│           ├── __init__.py
│           └── core.py         # Core classes
├── scripts/
│   └── remove_comments.py      # Comment removal tool
└── examples/
    └── cross_platform_script.py
```

---

## Developer Information

| Field | Value |
|-------|-------|
| Name | MERO |
| GitHub | [@6x-u](https://github.com/6x-u) |
| Telegram | [@QP4RM](https://t.me/QP4RM) |
| Project | MEROAI |
| Version | 1.0.0 |
| License | MIT |

---

## Changelog

### v1.0.0 (2024)
- Initial release
- Multi-language code analysis
- Image understanding
- Auto-fix capabilities
- Cross-platform support
- Arabic language support
- Script generation
- Device information

---

## License

MIT License - (c) 2024 MERO - MEROAI v1.0.0

GitHub: [@6x-u](https://github.com/6x-u) | Telegram: [@QP4RM](https://t.me/QP4RM)