Skip to main content

AI Programming Assistant for Code Analysis, Fixing, and Image Processing

Project description

MEROAI v0.5.0

MEROAI

A comprehensive Python library for code analysis, language detection, image processing, file management, JSON generation, and smart decorators.


Developer

Name MERO
Telegram @QP4RM
GitHub github.com/6x-u

Main Features

Code Analysis

  • Detect errors in Python, C, C++, Java, JavaScript, TypeScript, Go, Rust, Bash, C#
  • Automatic fixing of common errors
  • Automatic programming language detection

Image Processing

  • Analyze image information (dimensions, format, size)
  • AI-powered image description (OpenAI GPT-4o)
  • Image format conversion

File Management

  • Create files in any programming language
  • Automatic README.md generation for projects
  • Edit README sections
  • Save analysis results to txt files

File System Analysis

  • Find duplicate files
  • Detect hidden files
  • Find unnecessary files

Smart Decorators

  • @mero_schema - logging, timing, error handling
  • @mero_log - add logging to functions
  • @mero_validate - type validation

Installation

Standard Installation

pip install pillow openai numpy requests
git clone https://github.com/6x-u/MEROAI-1V.git

Termux Installation (Android)

pkg update && pkg upgrade -y
pkg install python git -y
pip install pillow numpy requests
git clone https://github.com/6x-u/MEROAI-1V.git
cd MEROAI-1V/scripts
./install_termux.sh

Quick Start

import sys
sys.path.insert(0, 'MEROAI-1V/src/MEROAI/meroai')
from core import MEROAI

m = MEROAI()
print(m.introduce())

Main Commands

Code Analysis and Fixing

m = MEROAI()

# Analyze code
result = m.analyze_code("def hello() print('hi')")
print(result['errors'])  # ['Missing colon after statement']

# Fix code
fixed = m.fix_code("def hello() print('hi')")
print(fixed)  # def hello(): print('hi')

# Analyze file
result = m.analyze_file("script.py")

# Fix and save file
m.fix_file("script.py", save=True)

# Analyze, fix and save to new file
m.analyze_and_fix_file("broken.py", "fixed.py")

Image Processing

# Analyze image
info = m.analyze_image("photo.png")
print(info['width'], info['height'], info['format'])

# AI description (requires OPENAI_API_KEY)
desc = m.describe_image("photo.png")
print(desc['description'])

# Save analysis to file
m.save_analysis_to_file(info, "photo_analysis.txt")

File Creation

# Create C++ file
cpp_code = '''#include <iostream>
int main() {
    std::cout << "Hello MEROAI!" << std::endl;
    return 0;
}'''
m.create_file("hello.cpp", cpp_code, "cpp")

# Create directory
m.create_directory("my_project/src")

README Generation

# Generate README for project
m.generate_readme("/path/to/project", "MyProject")

# Edit README section
m.edit_readme("README.md", "Features", "- Feature 1\n- Feature 2")

JSON Generation

# Convert to JSON
data = {"name": "MEROAI", "version": "0.5.0"}
json_str = m.generate_json(data)

# Save as JSON file
m.generate_json(data, "config.json")

# Generate JSON Schema
schema = m.generate_json_schema("User", {
    "name": "string",
    "age": "integer",
    "email": "string"
})

File System Analysis

# Analyze full directory
analysis = m.analyze_directory("/path/to/folder")
print(analysis['total_files'])
print(analysis['total_size_mb'])
print(analysis['extensions'])

# Find duplicates
duplicates = m.find_duplicates("/path/to/folder")

# Hidden files
hidden = m.find_hidden_files("/path/to/folder")

# Unnecessary files
unnecessary = m.find_unnecessary_files("/path/to/folder")

Docstrings

# Parse docstring
doc = m.parse_docstring(my_docstring, "numpy")

# Generate docstring
doc = m.generate_docstring(
    "calculate",
    {"a": "int", "b": "int"},
    "int",
    style="numpy",
    description="Calculate sum"
)

# Convert function to JSON Schema
schema = m.function_to_json_schema(my_function)

Smart Decorators

from core import mero_schema, mero_log, mero_validate

@mero_schema
def my_function(x: int) -> int:
    return x * 2

@mero_log(level="INFO")
def process_data(data):
    return data.upper()

@mero_validate
def add(a: int, b: int) -> int:
    return a + b

Python Interpreter

# Interpreter info
info = m.get_interpreter_info()

# Execute code
result = m.execute_python("x = 1 + 2")
print(result['locals'])  # {'x': 3}

Interactive Mode

m = MEROAI()
m.chat()

Available Commands

Command Description
help Show help
info MEROAI info
system System info
analyze <path> Analyze file
fix <path> Fix file
create <path> Create file
scandir <path> Analyze directory
json <data> Convert to JSON
readme <path> Generate README
image <path> Analyze image
saveimg <img> <out> Analyze image and save
exit Exit

Termux Scripts

cd ~/MEROAI-1V/scripts

# Full installation
./install_termux.sh

# Run MEROAI
./meroai.sh

# Analyze image
./image_analyzer.sh photo.jpg report.txt

# Fix code
./code_fixer.sh broken.py fixed.py

# Generate README
./readme_generator.sh ~/project MyProject

Supported Languages

Language Extensions
Python .py
C .c, .h
C++ .cpp, .cc, .hpp
C# .cs
Java .java
JavaScript .js, .jsx
TypeScript .ts, .tsx
Go .go
Rust .rs
Bash .sh, .bash

Requirements

Package Required Function
pillow Yes Image processing
numpy Yes Math operations
requests Yes HTTP requests
openai Optional AI image description

Supported Platforms

  • Windows (7, 8, 10, 11)
  • Linux (Ubuntu, Debian, Fedora, Arch)
  • macOS (10.15+)
  • Android (Termux)

License

MIT License


Contact


MEROAI v0.5.0 - Made by MERO

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

meroai-0.2.1.tar.gz (2.3 MB view details)

Uploaded Source

Built Distribution

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

meroai-0.2.1-py3-none-any.whl (2.7 MB view details)

Uploaded Python 3

File details

Details for the file meroai-0.2.1.tar.gz.

File metadata

  • Download URL: meroai-0.2.1.tar.gz
  • Upload date:
  • Size: 2.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for meroai-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2254b6a9689f4d16f2d640afe396f24424f576400d8428e8c37ade320768cde8
MD5 1395d186f29bb3b00b6e9d0cc0e5b93c
BLAKE2b-256 886850e876620a4ebb2c6a649800947a5f6c48ccfc52eb20b03ea59a23965ade

See more details on using hashes here.

File details

Details for the file meroai-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: meroai-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 2.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for meroai-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dc9085ee1edf3bd6304bed62702d4cd59156a344d4c82c45df7816b45a96183f
MD5 28feeaaa40a64e0aa5daf41cd63f7c41
BLAKE2b-256 9b228685a153c91c652c52430e549959f520250dd3175c85daad4f4fe29f2715

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