ShellGPT chats with language models in a terminal and can generate shell commands, stories, and Linux-terminal content.

github.com/jiacai2050/my-works/tree/main/shell…
shellgpt homepage screenshot

About shellgpt

ShellGPT is a terminal program that sends questions to a language model and prints the answer, covering uses such as shell command generation, text tasks and general chat. It installs two identical commands, sg and shellgpt, and can be used in direct mode (sg [question] or piping input), as an interactive REPL, or through a text user interface designed for shell command inference.

Configuration lives in ~/.shellgpt/config.toml, created by running sg --init, and the directory can be changed with the SHELLGPT_CONF_DIR environment variable. Profiles define the API endpoint, model, key and headers, so requests can go to a local server such as Ollama or to hosted services including OpenAI, GitHub Models and Cloudflare; prompts are sent to whichever endpoint is selected.

Key features

  • Direct mode: ask a question or pipe text to sg
  • REPL mode for interactive chat in the terminal
  • TUI mode with key bindings to infer, run and yank commands
  • Profiles switch between endpoints such as Ollama, OpenAI, GitHub and Cloudflare
  • Built-in roles for shell commands, typos, coding, summaries and polishing
  • Custom roles defined as system prompts in config.toml
Best for: Developers and Linux terminal users who want to query language models and generate shell commands without leaving the command line.
Good for
  • Configured through a single TOML file with switchable API profiles
  • Works with local endpoints such as Ollama as well as hosted API providers
  • Includes a TUI tailored to shell command inference with run and yank bindings
Watch out for
  • Requires a reachable endpoint and, for hosted providers, an API key
  • Setup involves installing Python packages and running an init command
  • Profiles and custom roles must be edited into the configuration file

shellgpt at a glance

Type
Open-source project
Pricing
Not confirmed. Check the site
Platforms
Linux
Open source
Not stated
Language
English
Last checked
Oct 6, 2026 · Online when checked
Listed
Oct 5, 2026

shellgpt alternatives

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

All 7 alternatives

dut

codeberg.org/201984/dut

dut calculates disk usage on Linux, according to its project description.

Atomic Chat

atomic.chat

Atomic Chat runs AI models locally on Mac, Windows, and iPhone, with the page listing models such as Gemma, Qwen, and DeepSeek.

Popular in Linux Apps

Well-known listings from the same topic.

All 222

shellgpt FAQ

How is ShellGPT installed?
Install with pip install -U shgpt or uv tool install shgpt. Both install the two identical commands sg and shellgpt.
Where is the configuration file kept?
Running sg --init creates a default configuration at ~/.shellgpt/config.toml. The directory can be changed by setting the SHELLGPT_CONF_DIR environment variable.
How do you switch between API providers?
Define each provider in the [profiles] section of the config file, then select one with the -p or --profile flag; the default_profile setting is used otherwise.
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