shellgpt

github.com/TheR1D/shell_gpt Linux & Mac Apps Open-source projectOpen source

ShellGPT brings AI language models to command-line workflows, according to its repository description.

github.com/TheR1D/shell_gpt
shellgpt homepage screenshot

About shellgpt

ShellGPT is a command-line tool that uses large language models to generate shell commands, code snippets, documentation, and answers to technical or general questions. It supports Linux, macOS, and Windows, and works with shells including Bash, Zsh, PowerShell, and CMD.

It accepts prompts as arguments or via stdin, pipes, and redirection, and can process piped input such as git diffs, logs, or files. The --shell option generates commands for the detected OS and shell, with options to execute, describe, or abort. By default it uses OpenAI's API with the GPT-4 model and requires an API key; local open-source models can be used with a separate backend such as Ollama.

Key features

  • Generate shell commands tailored to current OS and shell
  • Generate code snippets and documentation in terminal
  • Accept prompts via arguments, stdin, pipes and redirection
  • Analyze piped logs and suggest possible error solutions
  • Generate git commit messages from piped diff output
  • Execute or describe suggested commands with confirmation prompt
Best for: Terminal users who want AI help with shell commands, code, and log analysis in the command line.
Good for
  • Supports Linux, macOS, Windows and major shells including Bash, Zsh, PowerShell, and CMD
  • Handles piped input and redirection for logs, diffs, and files
  • Open source repository installable with pip install shell-gpt
Watch out for
  • Requires an OpenAI API key for default setup
  • OpenAI API use is not free of charge
  • Local model use requires separate backend setup and may not work as expected

shellgpt at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Open source
Yes · Source code
Language
English
Last checked
Oct 5, 2026 · Online when checked
Listed
Oct 5, 2026

shellgpt alternatives

Tools and sites you could use instead, ranked by how closely they match.

All 24 alternatives

Popular in Linux & Mac Apps

Well-known listings from the same topic.

All 196

shellgpt FAQ

How do I install ShellGPT?
Install with pip install shell-gpt.
What do I need to use ShellGPT with OpenAI?
An OpenAI API key. You are prompted for the key, which is then stored in ~/.config/shell_gpt/.sgptrc. OpenAI API use is not free of charge.
Can I use local models instead of OpenAI?
Yes, by setting up your own LLM backend such as Ollama, but ShellGPT is not optimized for local models and may not work as expected.
Is something wrong or out of date?

Tell us and an editor will check it.

Own this website?

Claim the listing and suggest updates yourself. An editor checks every claim first.

Claim this listing