# ther1d/shell_gpt

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ther1d-shell-gpt).**

12,131 stars · 970 forks · Python · MIT

## Links

- GitHub: https://github.com/TheR1D/shell_gpt
- awesome-repositories: https://awesome-repositories.com/repository/ther1d-shell-gpt.md

## Topics

`chatgpt` `cheat-sheet` `cli` `commands` `gpt-3` `gpt-4` `gpt-5` `linux` `llama` `llm` `ollama` `openai` `productivity` `python` `shell` `terminal`

## Description

Shell GPT is an AI-powered command-line interface that generates shell commands and source code from natural language prompts. It serves as a terminal-based tool for automating technical tasks, producing executable commands, and generating code snippets directly within the shell.

The tool distinguishes itself through a read-eval-print loop for interactive chatting and the ability to maintain stateful conversational history via named sessions. It supports flexible backend routing, allowing users to connect to cloud-based APIs or local language model hosts for offline operation and data privacy.

Capability areas include terminal data processing through standard-input pipe and redirection for log analysis and document summarization. Users can also define custom persona roles to tailor model behavior and implement system functions that the model can trigger to perform local tasks.

The project can be deployed as a standalone Python application or run within a Docker container.

## Tags

### Artificial Intelligence & ML

- [AI Code Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-code-generators.md) — A tool for producing pure code snippets from prompts and saving them directly to files or the system clipboard.
- [AI Command Line Automation](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/agent-and-tool-integrations/ai-command-line-automation.md) — Generates and executes terminal commands from natural language to automate technical tasks.
- [Shell Command Generation](https://awesome-repositories.com/f/artificial-intelligence-ml/shell-command-generation.md) — Translates natural language requests into executable shell scripts and commands to automate technical tasks. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Multi-turn Interaction Managers](https://awesome-repositories.com/f/artificial-intelligence-ml/agentic-systems-frameworks/conversational-voice-interaction/conversational-ai-agents/conversational-turn-detection/multi-turn-interaction-managers.md) — Manages stateful multi-turn interactions for an AI-driven terminal experience. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Interactive Chat REPLs](https://awesome-repositories.com/f/artificial-intelligence-ml/artificial-intelligence-tooling/terminal-ai-assistants/interactive-chat-repls.md) — An interactive read-eval-print loop for maintaining conversational context and chatting with AI models directly in the terminal.
- [Chat Model Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/chat-model-integrations.md) — Provides standardized interfaces for connecting to various local and cloud-based chat models. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Cloud Model Connectivity](https://awesome-repositories.com/f/artificial-intelligence-ml/cloud-model-connectivity.md) — Connects to cloud-hosted LLM backends for model inference using API keys and proxies. ([source](https://github.com/TheR1D/shell_gpt/wiki/Azure))
- [Cloud Model Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/cloud-model-integrations.md) — Configures cloud model integrations using API keys and base URLs. ([source](https://github.com/TheR1D/shell_gpt/wiki/Azure))
- [Conversation State Management](https://awesome-repositories.com/f/artificial-intelligence-ml/conversation-state-management.md) — Tracks dialogue history and interaction context across multi-turn sessions for AI-powered terminal interactions. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Conversational AI Interfaces](https://awesome-repositories.com/f/artificial-intelligence-ml/conversational-ai-interfaces.md) — A terminal-based chat interface that maintains conversational history through session identifiers for context-aware technical exploration.
- [Conversational Session Management](https://awesome-repositories.com/f/artificial-intelligence-ml/conversational-session-management.md) — Maintains stateful conversational history through named sessions for context-aware follow-up interactions. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Named Conversational Sessions](https://awesome-repositories.com/f/artificial-intelligence-ml/conversational-session-management/multi-session-context-synthesizers/named-conversational-sessions.md) — Preserves conversational history across requests using named sessions for context-aware interactions.
- [Language Model Connectivity](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-connectivity.md) — Provides a standard interface to connect to various external and local LLM providers. ([source](https://github.com/TheR1D/shell_gpt/wiki/Azure))
- [Language Model Querying](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-querying.md) — Provides interfaces for sending prompts to large language models and processing text responses from the terminal. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [CLI-Based Model Querying](https://awesome-repositories.com/f/artificial-intelligence-ml/language-model-querying/cli-based-model-querying.md) — Integrates a command-line interface for querying language models using prompts passed as arguments or via piping. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [LLM API Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-api-integrations.md) — Establishes connectivity with external LLM providers via API keys and environment variables. ([source](https://github.com/TheR1D/shell_gpt/wiki/Azure))
- [LLM Pipeline Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/llm-pipeline-integrations.md) — Analyzing logs, documents, and piped input by feeding standard input into a large language model for summarization or transformation.
- [Local LLM Clients](https://awesome-repositories.com/f/artificial-intelligence-ml/local-llm-clients.md) — A command line interface that routes requests to locally hosted models to maintain offline operation and data privacy.
- [Local Model Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/local-model-integrations.md) — Routes prompts to local LLM hosts to maintain offline functionality and reduce costs. ([source](https://github.com/TheR1D/shell_gpt/wiki/Ollama))
- [Natural Language Code Generators](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-code-generators.md) — Producing source code snippets from natural language prompts directly within the terminal and saving them to files or the clipboard.
- [Natural Language Query Interfaces](https://awesome-repositories.com/f/artificial-intelligence-ml/natural-language-query-interfaces.md) — Provides a natural language interface for querying AI models directly from the command line. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Terminal AI Automation](https://awesome-repositories.com/f/artificial-intelligence-ml/terminal-ai-automation.md) — Integrates artificial intelligence capabilities directly into terminal workflows for shell automation.
- [Azure OpenAI Integrations](https://awesome-repositories.com/f/artificial-intelligence-ml/vector-embeddings/openai-model-integrations/azure-openai-integrations.md) — Integrates specifically with Azure-hosted OpenAI models for terminal-based processing. ([source](https://github.com/TheR1D/shell_gpt/wiki/Azure))
- [AI Chatbots](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-chatbots.md) — Maintaining conversational history through session identifiers for context-aware chatting within the shell.
- [Local Model Backends](https://awesome-repositories.com/f/artificial-intelligence-ml/local-model-backends.md) — Configure the tool to use a locally hosted model instead of a cloud API to enable offline operation. ([source](https://github.com/TheR1D/shell_gpt/wiki/Ollama))
- [Role-Based Model Assignment](https://awesome-repositories.com/f/artificial-intelligence-ml/model-configuration/role-based-model-assignment.md) — Supports the assignment of specialized AI roles to tailor model behavior for specific technical tasks. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Persona Definitions](https://awesome-repositories.com/f/artificial-intelligence-ml/model-configuration/role-based-model-assignment/chat-role-assignment/persona-definitions.md) — Defines named persona configurations to tailor AI behavior and output for technical tasks.
- [Persona Configurations](https://awesome-repositories.com/f/artificial-intelligence-ml/persona-configurations.md) — Define reusable role profiles with specific instructions to tailor model output for particular tasks. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))

### Development Tools & Productivity

- [Natural Language Command Interpreters](https://awesome-repositories.com/f/development-tools-productivity/cli-command-interpreters/natural-language-command-interpreters.md) — An AI-driven command-line interface that generates shell commands and code from natural language prompts using large language models.
- [Command Line Interfaces](https://awesome-repositories.com/f/development-tools-productivity/command-line-interfaces.md) — An AI-powered terminal tool that generates shell commands and code from natural language prompts using large language models.
- [CLI Knowledge Retrieval](https://awesome-repositories.com/f/development-tools-productivity/cli-knowledge-retrieval.md) — Allows users to retrieve technical configurations and general knowledge directly from the terminal using natural language. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [CLI Pipe Integration](https://awesome-repositories.com/f/development-tools-productivity/cli-pipe-integration.md) — Integrates with Unix-style pipes to accept and process data for log analysis and commit message generation. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Code Snippet Generators](https://awesome-repositories.com/f/development-tools-productivity/code-snippet-generators.md) — Generates pure code snippets in multiple programming languages based on natural language prompts. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Read-Eval-Print Loops](https://awesome-repositories.com/f/development-tools-productivity/read-eval-print-loops.md) — Provides an interactive read-eval-print loop for real-time chatting and shell command generation.
- [Model-Triggered System Functions](https://awesome-repositories.com/f/development-tools-productivity/custom-task-functions/model-triggered-system-functions.md) — Allows the AI model to trigger custom Python functions to perform local system tasks and retrieve data. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [LLM-Triggered System Functions](https://awesome-repositories.com/f/development-tools-productivity/local-function-execution/agent-integrated-functions/on-demand-function-triggers/llm-triggered-system-functions.md) — Allows the AI to execute local system functions and analyze the resulting output.
- [AI Chat Loops](https://awesome-repositories.com/f/development-tools-productivity/read-eval-print-loops/ai-chat-loops.md) — Maintaining stateful conversational history and context through a read-eval-print loop directly within the command line interface.
- [Terminal Buffer Injections](https://awesome-repositories.com/f/development-tools-productivity/terminal-buffer-injections.md) — Inserts suggested shell commands directly into the terminal input buffer via hotkeys for immediate editing. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [Terminal Workflow Automations](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/cli-tooling-frameworks/cli-tooling/shell-productivity-enhancements/terminal-workflow-automations.md) — Processing logs and documents via piped input to automate data summaries and commit message generation.
- [Shell Automation](https://awesome-repositories.com/f/development-tools-productivity/terminal-shell-cli/terminal-cli-enhancements/shell-terminal-utilities/automation-integration-tools/shell-automation.md) — Automates shell interactions by injecting suggested command strings directly into the terminal's input buffer. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))

### DevOps & Infrastructure

- [Local-to-Cloud Conversions](https://awesome-repositories.com/f/devops-infrastructure/cloud-deployment/local-to-cloud-conversions.md) — Connects to locally hosted model providers to enable offline operation and data privacy. ([source](https://github.com/TheR1D/shell_gpt/wiki/Ollama))

### Programming Languages & Runtimes

- [Standard Input Processing](https://awesome-repositories.com/f/programming-languages-runtimes/user-input-capture/standard-input-processing.md) — Captures and processes data from standard input and file redirections to analyze logs and documents using AI. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [AI Chat REPLs](https://awesome-repositories.com/f/programming-languages-runtimes/expression-evaluators/interactive-read-eval-print-loops/ai-chat-repls.md) — A read-eval-print loop for maintaining conversational context and chatting with AI models directly in the terminal.

### Data & Databases

- [Response Caching](https://awesome-repositories.com/f/data-databases/response-caching.md) — Caches model responses locally to eliminate redundant API requests and reduce latency. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))
- [LLM Tool Triggers](https://awesome-repositories.com/f/data-databases/user-defined-functions/llm-tool-triggers.md) — Allows the model to execute custom local functions to perform system tasks and analyze the results. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))

### Networking & Communication

- [Chat Session Managers](https://awesome-repositories.com/f/networking-communication/chat-session-managers.md) — Provides tools for organizing and managing the lifecycle of individual AI chat sessions via named identifiers. ([source](https://cdn.jsdelivr.net/gh/ther1d/shell_gpt@main/README.md))

### Operating Systems & Systems Programming

- [Standard Stream Piping](https://awesome-repositories.com/f/operating-systems-systems-programming/standard-stream-piping.md) — Captures data from shell pipes and redirections to feed logs and documents into the AI.

### System Administration & Monitoring

- [AI-Powered Log Analysis](https://awesome-repositories.com/f/system-administration-monitoring/logging/terminal-log-analyzers/ai-powered-log-analysis.md) — Provides the ability to analyze logs and documents by piping standard input into a language model for summarization.

### Web Development

- [Provider-Agnostic LLM Routing](https://awesome-repositories.com/f/web-development/provider-agnostic-llm-routing.md) — Routes requests across different cloud and local LLM endpoints via configurable base URLs.
