Skip to main content

PyiMAi is a lightweight AI-powered CLI tool that allows you to interact with an AI model directly from your terminal, with optional image support.

Project description

Telegram-Discuss

PyMind

PyiMAi is a lightweight AI-powered CLI tool that allows you to interact with an AI model directly from your terminal, with optional image support.

🚀 Features

  • 💬 Chat with AI from your terminal
  • 🖼️ Send images along with prompts
  • ☁️ Upload images and get public URLs
  • ⚡ Simple CLI interface
  • 🧠 Works with or without images
  • 📦 Ready to use as a Python library or CLI tool

📦 Installation

  • Clone the project:
git clone https://github.com/DevZ44d/PyiMAi.git
  • Via PyPi
pip install pyimai -U

🧠 Usage Example (Class Ai)

  • Chatting with Artificial Intelligence (AI). I
from pyimai import Ask
def main():
    prompt: Ask= Ask(
        prompt="Hello, what is this?", 
        filepath=["download.jpg"] #you can add multi photos (local)
    )

    print(prompt.chat())

if __name__ == "__main__":
    main()
  • Uploading Image Online .
from pyimai import Upload


def main():
    _: Upload = Upload(
        filepath=["download.jpg"],  # you can add multi photos (required)
        expiration=15552000,  # automatically deleted after a certain time (in seconds, 60-15552000). (optional)
        key=""                # i default added one, so delete this argument (optional)
    )

    print(_.get_info())


if __name__ == "__main__":
    main()

Example response (Class Ai) (JSON)

{
    "request": "Hello, what is this ? and solve it .",
    "response": "This is a Math Olympiad question asking to solve the equation:\n\na^3 + a^2 = 36\n\nWe need to find the value of a that satisfies this equation.\n\nLet's solve it step-by-step:\n\n1. Rewrite the equation:\na^3 + a^2 = 36\n\n2. Factor out a^2:\na^2(a + 1) = 36\n\n3. Now, we look for integer values of a that satisfy this equation because Math Olympiad problems often expect integer or simple rational solutions.\n\nTry a = 2:\n2^2 × (2 + 1) = 4 × 3 = 12 ≠ 36\n\nTry a = 3:\n3^2 × (3 + 1) = 9 × 4 = 36\n\nThis works perfectly.\n\nSo, a = 3 is a solution.\n\nAnswer:\na = 3"
}

Example response (Class Upload) (JSON)

[
    {
        "data": {
            "delete_url": "https://ibb.co/twK1wYrW/db713ad7cde63f41189c589710396be2",
            "display_url": "https://i.ibb.co/MySJyP03/download.jpg",
            "expiration": 15552000,
            "height": 168,
            "id": "twK1wYrW",
            "image": {
                "extension": "jpg",
                "filename": "download.jpg",
                "mime": "image/jpeg",
                "name": "download",
                "url": "https://i.ibb.co/MySJyP03/download.jpg"
            },
            "size": 7895,
            "thumb": {
                "extension": "jpg",
                "filename": "download.jpg",
                "mime": "image/jpeg",
                "name": "download",
                "url": "https://i.ibb.co/twK1wYrW/download.jpg"
            },
            "time": 1765918544,
            "title": "download",
            "url": "https://i.ibb.co/MySJyP03/download.jpg",
            "url_viewer": "https://ibb.co/twK1wYrW",
            "width": 299
        },
        "status": 200,
        "success": true
    }
]

Class Terminal 🧠

pyimai -[OPTIONS] "[FOR-OPTION]"

Arguments:	           - Description:
    -p, --prompt	      Send a prompt to the AI
    -f, --filepath	      Image path (optional)
    -u, --upload	      Upload image only
    -e, --expiration	  default = 600 , Image expiration time (seconds)
    -k, --key             default i added one, The API key.
    -v, --version	      Show version
    -h, --help	          Show help

🚀 Usage (Class Terminal)

  • 🔹Send a normal text prompt (no image required):
pyimai -p "hello"
  • 🔹Ask the AI about an image:
pyimai -p "what is this?" -f "photo.jpg" # image must be in directory
  • 🔹 Upload an image and get its public URL:
pyimai -u "photo.jpg"
  • 🔹 Show version:
pyimai -v
  • 🔹 Show help:
pyimai -h

💬 Help & Support .

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

pyimai-6.0.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

pyimai-6.0.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file pyimai-6.0.0.tar.gz.

File metadata

  • Download URL: pyimai-6.0.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for pyimai-6.0.0.tar.gz
Algorithm Hash digest
SHA256 48bf68f5588665ebb360d62174b46c91a5cba0b60920a9d25755b2159c14f693
MD5 681bc71bc7aee6a43796055fc5da0f83
BLAKE2b-256 e3503394faa0449490ca9d743e344f08389a99dbe5f030c74229d6541525bfc6

See more details on using hashes here.

File details

Details for the file pyimai-6.0.0-py3-none-any.whl.

File metadata

  • Download URL: pyimai-6.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for pyimai-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd3b5315577c3593f09d5c2bef4374b7614b189bcf0c844fe7e2690ef9646e4
MD5 3d9bff7c0097e62a29b379144d143faf
BLAKE2b-256 5c48045be9c3467039aa3ca871d53ef4540dbf64b01366288cbfe530d1a88d98

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