SuperAPI AI Directory

console-chat-gpt

Enjoy seamless interactions with ChatGPT, MistralAI, Claude by Anthropic, Grok by xAI, Gemini by Google and DeepSeek directly from your command line. Elevate your chat experience with efficiency and ease.

Open website

About this tool

console-chat-gpt is a Python command-line interface (CLI) tool for chatting with a variety of AI models. It is designed to let users interact seamlessly directly in the command line with mainstream LLM providers such as OpenAI, MistralAI, Anthropic, xAI, Google AI, as well as any provider compatible with the OpenAI SDK (such as DeepSeek, Alibaba, Inception, Moonshot AI, OpenRouter, etc.) or models hosted locally by Ollama.

Main capabilities:

  • Support for multiple AI providers, including OpenAI, MistralAI, Anthropic, xAI, Google AI, as well as any LLM provider compatible with the OpenAI SDK and Ollama local models.
  • Support for conversations via a Telegram bot, including rich message formatting with Bot API 10.1 (when available), and support for rendering Markdown into structured output such as headings, lists, tables, quotes, formulas, details blocks, and more.
  • Support for OpenAI image generation (via the Responses API).
  • Support for the OpenAI Responses API.
  • Support for Anthropic prompt caching.
  • Support for the Model Context Protocol (MCP): if an MCP server is already in use, copy claude_desktop_config.json to the root directory and rename it to mcp_config.json to use it with any model.
  • The unified chat completion functionality is separated into an independent library that can be used in any application, providing a cross-provider API experience, with source code provided in Python and TypeScript versions.
  • All supported models support streaming output, disabled by default, and can be enabled in the settings menu.
  • Support for OpenAI Assistants Beta.
  • AI management mode: automatically determines which model to use based on task complexity.
  • Configuration file: easily customize application settings via the config.toml file, and it can also be configured via the in-app settings command.
  • Role selection: users can define the AI's role in the conversation to achieve a more personalized and interactive experience.
  • Temperature control: adjust the temperature of generated responses to control creativity and randomness in the conversation.
  • Command handling: the application responds to various commands entered by the user, enabling simple and intuitive interaction.
  • Image input: supported for selected models.
  • Error handling: clear and useful error messages make it easy to understand and resolve issues.
  • Conversation history: view previous interactions and save conversations for future reference, providing context and continuity.
  • Graceful exit: smoothly handles interruptions, ensuring conversations are saved before exiting to avoid losing progress.

Usage:

  1. Clone the repository: git clone https://github.com/amidabuddha/console-chat-gpt.git
  2. Enter the folder: cd console-chat-gpt
  3. Install dependencies: python3 -m pip install -r requirements.txt
  4. Obtain an API key from OpenAI, MistralAI, Anthropic, xAI, Google AI Studio, or a related platform.
  5. On first run, config.toml.sample is automatically copied to config.toml, and you are prompted to enter the API key. Other default settings can be changed as needed.
  6. Run the executable: python3 main.py. It is recommended to create an alias so you can run it from anywhere.
  7. Use the help command in chat to view available options.

Configuration options:

  • Various options can be configured in config.toml.
  • Supports mapping Telegram chats to each model via telegram_chat_id or telegram_chat_ids. When a chat is mapped to a model, that chat is fixed to that model (the model switching command is disabled), but other commands (such as /mode, /role, /reasoning, /websearch, /webfetch, etc.) remain available.
  • Add models supported by the OpenAI SDK: add an entry at the end of the config.toml file, using the example structure.

Use cases:

  • Developers and technical users quickly interacting with multiple AI models in a command-line environment.
  • Application development that requires a unified API experience across providers.
  • AI conversations via a Telegram bot.
  • Running Ollama models locally for chat.
  • Scenarios that require MCP support.

Limitations:

  • The script works well on Linux and MacOS terminals; WSL is recommended for Windows.
  • The project has been marked as deprecated; for new installations, its successor tellm is recommended (a Telegram assistant written in Rust, supporting Claude, GPT/Grok, Gemini, compatible endpoints, and local Ollama, with per-room model selection and keychain-backed keys).
  • Users need to obtain API keys for each provider themselves.
  • Streaming output is disabled by default and must be enabled manually.
  • Image input is supported only for selected models.
  • It has no affiliation with OpenAI, MistralAI, Anthropic, xAI, Google AI, etc., and no relationship with them.