Description
ShellGPT is a command-line tool that uses large language models to generate shell commands, code snippets and documentation from a plain-language request, so you do not have to search for the syntax of common commands such as find. It runs on Linux, macOS and Windows, and it works with common shells including PowerShell, CMD, Bash and Zsh. Prompts can be given as arguments or piped in through standard input, so you can ask it to write a git commit message from a diff or to analyze a log file and suggest fixes. With the --shell option, it generates a command and can run it in the terminal, and it takes the operating system and the current shell into account, so an update request can produce different commands on macOS and Ubuntu. By default it uses OpenAI's API and a GPT-4 model, and it asks for your API key the first time, storing it in ~/.config/shell_gpt/.sgptrc. The README notes that the OpenAI API is not free and points to its pricing. It can also be pointed at a local open-source model served by a backend such as Ollama, though the README warns that it is not optimized for local models and may not work as expected.…
Highlights
- Shell commands from plain-language requests
- Works with Bash, Zsh, PowerShell and CMD
- Accepts piped input and arguments
- OS and shell aware suggestions
- Can use local models through Ollama
Ratings & Reviews
No ratings yet
Be the first to rate Shell GPT.
People also visit
Shell GPT FAQ
What does ShellGPT do?
It generates shell commands, code snippets and documentation from your requests, so you do not need to search online for the syntax.
Which operating systems and shells are supported?
Linux, macOS and Windows, with shells including PowerShell, CMD, Bash and Zsh.
Does it need an API key?
By default, yes. It uses OpenAI's API and asks for your key, which it stores in ~/.config/shell_gpt/.sgptrc.
Is the OpenAI API free?
No. The README says the OpenAI API is not free of charge and links to its pricing.
Can I use it without OpenAI?
The README says you can run open-source models locally with a backend such as Ollama, but it is not optimized for local models.
How do I pass input?
As a command-line argument or through standard input, so you can pipe logs or diffs into it.
What are the best Shell GPT alternatives?
Popular alternatives to Shell GPT include ShellGPT, TerminalGPT and Shellsage. See all Shell GPT alternatives



