# ShellGPT

A command-line productivity tool that uses a large language model to generate shell commands, code snippets and documentation directly in the terminal, accepting piped input from other commands.

ShellGPT is a command-line productivity tool powered by a large language model that generates shell commands, code snippets and documentation directly in the terminal, aimed at cutting down on trips to a search engine for routine tasks. It runs on Linux, macOS and Windows, and works with major shells including PowerShell, CMD, Bash and Zsh.

By default it uses OpenAI's API and stores an entered API key locally after first use; it can also be pointed at a locally hosted model through Ollama instead, though the project notes it is not tuned for local models and results there may be less reliable. A prompt can be passed as a command-line argument or piped in through standard input, so it can be chained with other commands, for example generating a commit message from the output of a diff, or reading application logs and suggesting a likely cause and fix for an error it finds in them.

Website: https://github.com/TheR1D/shell_gpt
