Skip to main content

MahanAI: terminal AI agent for NVIDIA NIM (OpenAI-compatible), tools, streaming, /api-key, safety prompts.

Project description

MahanAI Finale

Terminal AI agent using NVIDIA NIM (integrate.api.nvidia.com) with OpenAI-compatible chat, streaming, and tools (run shell commands, read/write files, list directories).

Install

pip install mahanai-finale
mahanai

API key

  1. Environment: MAHANAI_API_KEY=...
  2. Project .env: MAHANAI_API_KEY=...
  3. Saved config (persists): inside the app run /api-key your-key or /api-key for a hidden prompt. Keys are stored under %APPDATA%\MahanAI\config.json on Windows or ~/.config/mahanai/config.json on Linux/macOS.

Use this one for now: mai-api-91023847562910

Optional

  • MAHANAI_MODEL — model id from GET https://integrate.api.nvidia.com/v1/models
  • MAHANAI_STREAM=0 — disable streaming (wait for full replies)
  • MAHANAI_CONFIG_DIR — override directory for config.json

Commands

  • /exit or /quit — leave
  • /api-key [key] — save API key (omit key for prompt)
  • /api-key clear — remove saved key from disk
  • /help — short help

Develop

pip install -e .
python -m mahanai

Publish to PyPI

Bump version in pyproject.toml and mahanai/__init__.py, then:

pip install build twine
python -m build
python -m twine check dist/*

Upload only the new release files (example for v1.1.0):

Windows (PowerShell) — use an API token with “Entire account” or project scope:

$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-YOUR_TOKEN_HERE"
python -m twine upload dist/mahanai_finale-1.1.0*

macOS / Linux:

export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-YOUR_TOKEN_HERE
python -m twine upload dist/mahanai_finale-1.1.0*

twine cannot publish without your token; keep it out of git.

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

mahanai-3.0.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distribution

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

mahanai-3.0.0-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file mahanai-3.0.0.tar.gz.

File metadata

  • Download URL: mahanai-3.0.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mahanai-3.0.0.tar.gz
Algorithm Hash digest
SHA256 341c132101c20afbdf6e73c70f0ca38c17de7f43037e5bc01c9c0c4ea67595a5
MD5 0cd2df3787507ec575b7af11ff057a26
BLAKE2b-256 80d12ac906dd9608b25227392a5d2fb795eced1cb4023f38f91657bd2fb501db

See more details on using hashes here.

File details

Details for the file mahanai-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: mahanai-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for mahanai-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd7e20d212cba573682a1dce03a28ed421962a4420619736cf2111c0861e75d3
MD5 ba78d4a5b3ff9c23db2ef5e376d0d381
BLAKE2b-256 da19de6a1e9359c59c259e09f680b617331e9f56ee349f870bd3e4e9dedf7c3f

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