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.1.0.tar.gz (11.8 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.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mahanai-3.1.0.tar.gz
Algorithm Hash digest
SHA256 3e81461ecb54c3db45b3fa9b940fa1dd87abd98f2a918406b105ed5fcfdbf169
MD5 abd73361c16c5dbe08c2297185b891c5
BLAKE2b-256 1954aa3a6d4e7957216629765d62bf6937c715012e564eec8ffc82059ad240e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mahanai-3.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ff0c259798cb490dbcec941d95d2c498fab1570b3c12a300daa3b154e22daa58
MD5 89e13a7685305c824dabdf6ec699a7ef
BLAKE2b-256 3a5d044533de6234920d88b1756d95e19ff478189d6ce97500ac9c97528678a1

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