AI on the command line using GPT and Claude
Mods is a command-line tool that brings AI-powered assistance to shell pipelines and workflows. It reads input from standard input or arguments, sends it to a Large Language Model (LLM), and returns formatted responses that can be piped to other commands or saved for later use. The tool is designed to make command-line workflows "artificially intelligent" by allowing users to query, format, and process command outputs using natural language.
The tool supports multiple AI providers including OpenAI, Cohere, Groq, Azure OpenAI, Google's Gemini, and local AI installations through LocalAI. Mods can format responses as Markdown, JSON, or other text formats, making it versatile for different use cases. It includes features like conversation saving with SHA-1 identifiers, custom roles for different types of prompts, and extensive configuration options for fine-tuning AI responses.
Mods is particularly useful for developers, system administrators, and power users who want to integrate AI capabilities into their existing command-line workflows. The tool excels at tasks like explaining command outputs, formatting data, generating shell commands, and providing contextual assistance within terminal sessions. However, it's worth noting that the project will be sunset on March 9, 2026, with the team focusing on their newer tool "Crush".
# via Homebrew
brew install charmbracelet/tap/mods
# via APT (Debian/Ubuntu)
sudo mkdir -p /etc/apt/keyrings && curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg && echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list && sudo apt update && sudo apt install mods
# via Go
go install github.com/charmbracelet/mods@latest

