DEV Community

Tommy Johnifer
Tommy Johnifer

Posted on

MahanAI is INSANE

MahanAI Super: A Powerful Terminal AI Agent for Developers

Introduction

As AI tools evolve, many developers want more control, flexibility, and the ability to work directly from the command line. MahanAI Super is a terminal-based AI agent that combines chat, multi-model support, a local API gateway, plugins, and customization—all in one tool.

Instead of being tied to a single provider or UI, MahanAI lets you work with multiple AI systems like OpenAI and Anthropic from your terminal, while also acting as a bridge between them.


What is MahanAI Super?

MahanAI Super is a command-line AI assistant and gateway that allows you to:

  • Chat with AI models directly in your terminal
  • Switch between multiple providers and models
  • Run a local API server compatible with OpenAI and Anthropic formats
  • Extend functionality with plugins
  • Customize the interface with themes

It’s both a developer tool and an AI workflow hub.


Installation

pip install mahanai
mahanai
Enter fullscreen mode Exit fullscreen mode

Terminal-Based AI Chat

MahanAI runs entirely in the terminal, making it ideal for developers who prefer keyboard-driven workflows. You can interact with it just like a chatbot, but without leaving your development environment.


Multi-Model Support

MahanAI supports multiple AI backends, including:

  • OpenAI-style models
  • Anthropic (Claude) models
  • NVIDIA NIM models
  • Local models via Ollama
  • Custom OpenAI-compatible endpoints

You can switch models at any time using:

/models
Enter fullscreen mode Exit fullscreen mode

Gateway Server Mode

One of MahanAI’s most powerful features is its ability to run as a local API server:

mahanai --server
Enter fullscreen mode Exit fullscreen mode

This creates a local endpoint like:

http://localhost:8080
Enter fullscreen mode Exit fullscreen mode

It supports:

  • POST /v1/chat/completions (OpenAI format)
  • POST /v1/messages (Anthropic format)
  • GET /v1/models

This allows external tools like Cursor, Continue, or LM Studio to connect to a single unified backend.


Automatic Routing and Format Conversion

MahanAI automatically routes requests based on the model name. For example:

  • gpt-* → OpenAI
  • claude-* → Anthropic
  • meta/llama-* → NVIDIA

It also converts between OpenAI and Anthropic formats automatically, allowing tools designed for one API to work with another.


Plugins and Extensibility

MahanAI supports plugins written in .mmd files. These plugins can:

  • Add new slash commands
  • Run shell commands
  • Integrate external tools
  • Extend MahanAI’s behavior

Plugins can be loaded locally or installed from the built-in plugin store.


Themes and Customization

MahanAI includes multiple built-in themes and supports custom .mai theme files.

Built-in themes include:

  • midnight
  • light
  • midnight-cb (colorblind-friendly)
  • light-cb (colorblind-friendly)

Custom themes allow you to change colors, labels, and even the ASCII banner.


Command System

MahanAI includes a rich set of commands:

  • /models — select models
  • /mode claude — switch to Claude mode
  • /effort high — increase reasoning depth
  • /plan on — enable planning mode
  • /themes — switch themes
  • /plugin-load — load plugins

These commands make the tool highly interactive and customizable.


Why MahanAI Stands Out

MahanAI combines several powerful concepts into one tool:

  • Terminal AI assistant
  • Multi-provider model routing
  • Local API gateway
  • Plugin ecosystem
  • Full customization

This makes it especially useful for developers and advanced users who want control over their AI workflows.


Conclusion

MahanAI Super is more than just a chatbot—it’s a flexible AI workspace designed for the terminal. With support for multiple providers, local servers, plugins, and customization, it provides a powerful environment for experimenting with and building AI-powered workflows.

For developers who prefer working in the command line, MahanAI offers a fast, extensible, and highly capable alternative to traditional AI interfaces.

Top comments (0)