Command line tools for working with AI Chatbots
August 23, 2024
Table of Contents
- Free and open source chatbot software
- Terminal GPT (tgpt)
- Chatblade
- chatGPT-shell-cli
- ShellGPT
- ΦωΦ (python-owega)
- shellChatGPT
- openai-cli
- pdfgpt
- AIChat
- AIChatNG
- air (AI in Rust)
- ChatGPT-CLI (gpt-chatbot-cli)
- GPTO (Geppetto)
- GPTScript
- gpt-cli
- Ruby OpenAI
- BashSenpai
1. Free and open source chatbot software
For AI chatbots (like ChatGPT), there are official web interfaces, integrations into various applications (such as office or OS search), and APIs.
When it comes to command line tools (CLI), they usually don't have official releases because APIs are provided for developers. However, the command line is the most familiar way for advanced Linux users to interact with applications and automate. For this reason, there are a lot of unofficial CLIs for AI Chatbots.
Looking ahead, if your idea is to automate work with ChatGPT without paying for the API, then in my case it ended in failure: tools for working with ChatGPT use API keys; and tools that do not require API keys use alternative AI chatbots that sometimes produce unexpected results (inappropriate text insertions, and sometimes even HTML code of a web page).
However, if you are looking for command line tools to effectively work with ChatGPT and automate it, and you are willing to pay for API keys, then in this article you will learn about the available alternatives that will help improve your productivity.
2. Terminal GPT (tgpt)
Website: https://github.com/aandrew-me/tgpt
tgpt is a cross-platform command line tool (CLI) that allows you to use an AI chatbot in the terminal without the need for API keys.
To be more precise, only some of the AI chatbots can be used without API keys. For the rest, API keys are required.
Terminal GPT (tgpt) supports the following providers:
- blackboxai. Uses the BlackBox model. Great for developers
- duckduckgo. Available models: gpt-4o-mini (default), meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo, mistralai/Mixtral-8x7B-Instruct-v0.1, claude-3-haiku-20240307
- groq: Requires free API keys. Supports LLaMA2-70b & Mixtral-8x7b
- koboldai: Uses only koboldcpp/HF_SPACE_Tiefighter-13B, answers from novels
- ollama: Needs to be run locally. Supports many models.
- openai: Requires API key, supports various models. Recognizes OPENAI_API_KEY and OPENAI_MODEL environment variables. Supports custom URLs that can be specified with the --url switch
- phind: Uses Phind Model. Great for developers
3. Chatblade
Website: https://github.com/npiv/chatblade
Chatblade is a general-purpose command-line interface (CLI) tool designed to interact with OpenAI's ChatGPT. It accepts piped input, arguments, or both, and allows you to save common prompt preambles for quick use. Additionally, Chatblade provides utility methods to extract JSON or Markdown from ChatGPT responses.
Note: You will need to set up your OpenAI API key to use Chatblade. This can be done by passing --openai-api-key KEY or by setting the OPENAI_API_KEY environment variable (recommended).
4. chatGPT-shell-cli
Website: https://github.com/0xacx/chatGPT-shell-cli
A simple, lightweight shell script for using OpenAI chatGPT and DALL-E from the terminal. No Python or JS (node.js) installation is required. The script uses the official ChatGPT gpt-3.5-turbo model with the OpenAI API endpoint /chat/completions. You can also use the new gpt-4 model if you have access.
The script supports using all other OpenAI models with the completions endpoint and the images/generations endpoint for image generation.
5. ShellGPT
Website: https://github.com/TheR1D/shell_gpt
A command line tool for improving productivity, powered by large language models of AI (LLM). This command line tool offers optimized generation of shell commands, code snippets, documentation, eliminating the need for external resources (e.g. Google search). Supports Linux, macOS, Windows and is compatible with all major shells such as PowerShell, CMD, Bash, Zsh, etc.
By default, ShellGPT uses the OpenAI API and the GPT-4 model. You will need an API key.
6. ΦωΦ (python-owega)
Website: https://pypi.org/project/owega/
ΦωΦ (owega) is a command line interface for interacting with GPT models (from OpenAI).
7. shellChatGPT
Website: https://gitlab.com/fenixdragao/shellchatgpt
A wrapper for OpenAI ChatGPT, DALL-E, Whisper, and TTS. Includes integration with LocalAI, Ollama, Gemini, Mistral, Groq, and Anthropic.
8. openai-cli
Website: https://github.com/LevitatingBusinessMan/openai-cli
openai-cli is a command line interface for interacting with GPT models (OpenAI API). It aims to provide most of the API functionality. It is written in Rust.
9. pdfgpt
Website: https://github.com/Mariosmsk/pdfgpt
pdfgpt is a Python package that allows users to have natural language conversations with PDF documents.
10. AIChat
Website: https://github.com/sigoden/aichat
A general-purpose AI command line tool including Chat-REPL, Shell Assistant, RAG, AI tools and agents, with access to OpenAI, Claude, Gemini, Ollama, Groq and more.
11. AIChatNG
Website: https://github.com/blob42/aichat-ng
A universal CLI chat and AI-powered Copilot that integrates 20+ AI frameworks including OpenAI, Azure-OpenAI, Gemini, Claude, Mistral, Cohere, VertexAI, Bedrock, Ollama, Ernie, Qianwen, Deepseek…
AIChatNG is a fork of AIChat (https://github.com/sigoden/aichat) with some improvements.
12. air (AI in Rust)
Website: https://github.com/alescdb/air
A simple Rust program to call the ChatGPT API from the command line with markdown output in ANSI. This project replaces aid (written in Dart) and implements chatgpt and llama-cpp.
13. ChatGPT-CLI (gpt-chatbot-cli)
Website: https://github.com/rukh-debug/gpt-chatbot-cli
This is a very minimalistic command line application where you can chat and save the conversation session in memory using ChatGPT, and also save the chat history for later use.
14. GPTO (Geppetto)
Website: https://github.com/alanvardy/gpto
An unofficial OpenAI client with a command line interface.
15. GPTScript
Websites:
GPTScript is a framework that allows Large Language Models (LLM) to work and interact with various systems. These systems can range from local executables to complex applications. This can be done using OpenAPI schemes, SDK libraries, or any RAG-based solution. GPTScript is designed to easily integrate any system, local or remote, with your LLM with just a few lines of code.
16. gpt-cli
Website: https://github.com/kharvd/gpt-cli
A command line interface for ChatGPT, Claude, and Bard.
17. Ruby OpenAI
Website: https://github.com/alexrudall/ruby-openai
A hands-on app for using the OpenAI API. Generate text with GPT-4o, transcribe and translate audio with Whisper, or create images with DALL E.
18. BashSenpai
Website: https://github.com/BashSenpai/cli
BashSenpai is a command line tool that harnesses the power of ChatGPT right from your terminal. You can ask questions and get insightful answers related to shell scripting, making it an indispensable asset for both beginners and experienced users.
Related articles:
- GUI software for working with AI Chatbots (96.9%)
- ONVIF client with command line interface (53.2%)
- How to run PHP script on the command line (without web server) (53.2%)
- How to fix Linux booting to black screen (SOLVED) (53.2%)
- How to use Kali Linux to check web-sites (50%)
- Error: failed to commit transaction (conflicting files) (SOLVED) (RANDOM - 50%)