aicoolies logo

ShellGPT

AI-powered command-line productivity tool

Share
open-sourceOpen Source
Visit Website →

ShellGPT (sgpt) is a command-line productivity tool powered by OpenAI models that generates shell commands, code snippets, and documentation directly in the terminal. Integrates with Bash, Zsh, PowerShell, and CMD; places AI-suggested commands into the terminal input via hotkeys. Supports persistent chat sessions, a REPL mode, and custom Python functions for extending capabilities. Accepts stdin and arguments for pipe-based workflows where command output can be piped to the AI.

ShellGPT (sgpt) is a command-line productivity tool powered by large language models that enables developers to generate shell commands, code snippets, and documentation directly from the terminal. It integrates OpenAI's GPT models with standard command-line interfaces including Bash, Zsh, PowerShell, and CMD, transforming natural language queries into executable commands and working code. ShellGPT solves the common developer need of quickly looking up command syntax, generating boilerplate code, and getting AI assistance without leaving the terminal.

ShellGPT offers shell integration that places AI-generated command suggestions directly into the terminal input line via hotkeys, persistent chat sessions for maintaining context across interactions, a REPL mode for interactive conversations, and custom functions defined as Python scripts for extending capabilities. It accepts input from both stdin and command-line arguments, enabling pipe-based workflows where command output can be fed directly to the AI for analysis. ShellGPT supports different query modes for shell commands, code generation, and general questions.

ShellGPT is designed for developers and system administrators who want a lightweight, focused AI assistant integrated into their existing terminal workflow. It is particularly effective for quickly generating complex command-line one-liners, explaining error messages, writing small utility scripts, and getting answers to technical questions without context-switching to a browser. ShellGPT works on macOS, Linux, and Windows, and competes with tools like tgpt and GitHub Copilot CLI in the terminal AI assistant space, differentiating itself through its persistent chat sessions and custom function support.

Pricing

Free (bring your own API key)

Platforms

macOS, Linux, Windows (Python)

Categories

Tags

Use Cases

Alternatives

AIChat

All-in-one LLM CLI tool with shell assistant, RAG, and function calling

All-in-one LLM CLI written in Rust that gives unified access to 20+ AI providers (OpenAI, Claude, Gemini, Ollama, Groq, Mistral, DeepSeek, and more) through one terminal interface. Includes a shell assistant, interactive REPL with session management, RAG over local files and URLs, custom roles, function calling, and a built-in HTTP server exposing Chat Completions, Embeddings, and Rerank APIs plus an LLM Playground and Arena for model comparison.

open-sourceOpen Source

tgpt

Terminal AI chatbot — no API key required

Cross-platform terminal GPT client written in Go that provides free access to AI chatbots (KoboldAI, Blackbox AI, OpenAI) without API keys or account creation. Offers interactive multi-turn chat, shell command generation and execution, code generation, and image generation via Pollinations. Distributed as a single binary with no dependencies, making installation trivial on macOS, Linux, and Windows. Ideal for developers who want quick AI in the terminal without signup friction.

open-sourceOpen Source

Fabric

Modular AI prompt framework for everyday tasks

Fabric is an open-source framework that organizes AI prompts into reusable patterns for solving everyday tasks like summarizing content, explaining code, extracting insights from videos, and generating social media posts. Written in Go with support for 20+ AI providers including OpenAI, Claude, Gemini, and Ollama, it runs from the command line and can serve as a REST API. With 40,000+ GitHub stars, Fabric bridges the gap between AI capabilities and practical workflow automation.

open-sourceOpen Source

Related Tools

Ghostty logo

Ghostty

Top Pick

Fast, native terminal emulator

GPU-accelerated terminal emulator written in Zig by Mitchell Hashimoto (HashiCorp co-founder). Native UI rendering on macOS and Linux. Supports ligatures, true color, Kitty graphics protocol, and splits/tabs. Configurable via a simple key-value file with sensible defaults. Open-source with 20K+ GitHub stars and a focus on correctness, speed, and minimal resource usage. Growing as a modern alternative to iTerm2, Alacritty, and WezTerm.

open-sourceOpen Source
Claude Code logo

Claude Code

Top Pick

Anthropic's agentic coding CLI

Anthropic's agentic CLI coding tool that delegates complex tasks to Claude directly from the terminal. Understands entire codebases via automatic context gathering, edits multiple files, runs shell commands, and manages Git workflows autonomously. Supports CLAUDE.md for persistent project instructions, integrates with VS Code and JetBrains, and uses Claude Opus/Sonnet with extended thinking for complex architectural decisions. Built for terminal-first developers.

paidOpen Source
Hermes Agent logo

Hermes Agent

Top Pick

Open-source AI agent framework with persistent memory, reusable skills, tools, and messaging gateways

Hermes Agent is an open-source AI agent framework with persistent memory, reusable skills, 40+ tools, cron jobs, and messaging gateways.

open-sourceOpen Source
pi dev code

Pi

Top Pick

Minimal terminal coding harness

Pi Coding Agent is an MIT-licensed Node.js CLI from earendil-works for building and running coding agents in a local terminal. The current package describes a read/bash/edit/write toolset and session management, while the repo positions Pi as a unified LLM API, agent loop, TUI, and coding-agent CLI. It is best framed as a lean, self-extensible BYO-model toolkit rather than a managed IDE.

open-sourceOpen Source
OpenCode logo

OpenCode

Top Pick

Open-source AI coding agent for the terminal

Open-source terminal-based AI coding agent built in Go by the SST team, with a rich TUI (Bubble Tea) supporting 75+ model providers including OpenAI, Anthropic, Gemini, Bedrock, Groq, and OpenRouter. Features vim-like editing, persistent SQLite sessions, and LSP integration for 40+ languages. Fully free with no vendor lock-in, it has rapidly grown to 95k+ GitHub stars.

open-source
Codex logo

Codex

Top Pick

OpenAI coding agent for app, editor, terminal, and cloud work

Codex is OpenAI's coding agent for software development across the Codex app, editor, terminal, and cloud tasks. It helps write, review, debug, refactor, and automate code, with ChatGPT plan access for managed surfaces and API-key usage for CLI, SDK, and IDE workflows. The open-source CLI and SDK support local repository work, while cloud features add GitHub review, Slack/Linear integrations, worktrees, skills, MCP, and automations.

freemiumOpen Source