mrkeyoor.com_
Tue 03 Nov 07:17 UTC
AI Toolsevaluationupdated 28 Sept 2026

shell_gpt review

ShellGPT, invoked as `sgpt`, sends terminal prompts or piped text to a language model and returns prose, code, or shell commands. It also keeps named chats, installs Bash or Zsh hotkeys, caches replies, and can let the model call Python functions.

+5stars / 7d
Verdict

Our ShellGPT run installed 74 packages in 35 seconds, then all 4 test modules failed during collection before any test passed. It is still worth trying as a command suggestion and text-piping tool if execution stays manual and you approve the configured model endpoint. Do not install the shell-executing function on an important workstation until its no-confirmation path is fixed or you have isolated it yourself.

We ran it

Lab card: what happened when we ran shell_gptScreenshot of shell_gpt (github.com/TheR1D/shell_gpt)
Install✓ · 35s74 packages · 102 MB
Build✓ · 5s
Tests✗ · 8s0 passed · 0 failed · 4 errors of 4 (pytest)
Known vulns6(pip-audit)
Repo42 files~2,758 lines of source · 0.1 MB · 4 CI workflows · Dockerfile · tests dir

Answers from our run

Does shell_gpt build from source?

Dependencies installed in 35 seconds (74 packages), and the build succeeded in 5 seconds. We cloned commit a082bd5 into a clean Debian container with 3 CPUs and no project-specific setup.

Do shell_gpt's tests pass?

No. The project's own test command finished in 8 seconds and reported 0 passed, 0 failed, 4 collection errors (pytest).

Does shell_gpt have known vulnerabilities in its dependencies?

pip-audit flagged 6 known advisories in the dependency tree at the time of our run.

Who should not use shell_gpt?

Anyone expecting every model-proposed command to require confirmation: open issue 793 reports that the bundled execute_shell_command function can run without the prompt used by shell mode.

What are the alternatives to shell_gpt?

LLM, aichat, Ollama. Our ShellGPT run installed 74 packages in 35 seconds, then all 4 test modules failed during collection before any test passed.

Setup3/535-second install; interactive setup blocked all 4 test modules
Docs4/5Many examples, but the default-model text conflicts
Community4/512,288 stars with issue activity through September 2026
Maturity3/5v1.5.1 is active, but function safety and 6 advisories weigh

Discussed on

  1. hnCall GPT-3 from Terminal156 points
  2. hnShellGPT: A CLI productivity tool powered by LLMs like GPT-43 points

Who it’s for

Terminal users who want quick command suggestions and will inspect every command before running it.
Developers who want to pipe diffs, logs, or documents into an OpenAI-compatible model.
People who prefer named chat sessions and local response caching over a browser chat.
Teams prepared to control function calling, provider credentials, and sensitive stdin.

Who it’s NOT for

Anyone expecting every model-proposed command to require confirmation: open issue 793 reports that the bundled execute_shell_command function can run without the prompt used by shell mode.
Users who need local models to behave like the hosted default: the README says ShellGPT is not optimized for local models and may not work as expected.
Shared-account environments where a provider key must not be stored in a user config file: the default setup writes it to ~/.config/shell_gpt/.sgptrc.
Teams that require a clean, noninteractive test run before adoption: all 4 test modules stopped during collection in our no-secret sandbox.
Developers adopting GPT-5.6 with functions today: open issue 801 reports that this combination returns HTTP 400 on the current Chat Completions path.

Setup reality

Our install succeeded in 35 seconds, adding 74 packages and using 102 MB. The build passed in 5 seconds. Tests exited with code 1 after 8 seconds: 0 passed, 0 failed, and all 4 modules stopped during collection or setup. Pip-audit reported 6 known vulnerabilities.

Normal use needs an OpenAI API key or another configured model endpoint. The default prompt stores the key in ~/.config/shell_gpt/.sgptrc; an environment variable can supply it instead. Ollama requires a separate local backend, and the README warns that local models may not behave as expected.

The log showed Python getpass warnings followed by pytest refusing to read stdin while capture was active. Shell integration edits Bash or Zsh startup files, while chat and response caches need deliberate storage paths. Function calling can execute local Python functions, so its permissions matter as much as the model setting.

ShellGPT puts four useful terminal modes behind one command

ShellGPT accepts a question as an argument or reads text from stdin. Plain mode returns an answer, --code asks for code only, and --shell produces a command suited to the detected operating system and shell. Named chat sessions retain earlier messages, while REPL mode keeps the exchange open. That range fits the terminal well because the input can come straight from git diff, a log command, or a document.

Shell mode has the best interaction in the project. It displays the proposed command and offers Execute, Modify, Describe, or Abort before anything runs. Bash and Zsh users can install a Ctrl+l integration that replaces the current terminal buffer with a suggestion, leaving the final edit and Enter press to the operator. PowerShell and CMD appear in the broader compatibility claim, but the documented hotkey installer is specifically for Bash and Zsh.

What happened when we ran it

Our sandbox installed 74 Python packages in 35 seconds and used 102 MB on disk. The build finished successfully in 5 seconds. The checkout at commit a082bd5 contained 42 files, roughly 2,758 source lines, 4 CI workflow files, a Dockerfile, and a tests directory. Pip-audit reported 6 known vulnerabilities in the installed environment, so a production trial should identify the affected packages and decide whether its chosen execution path reaches them.

The test command exited with code 1 after 8 seconds. Pytest recorded 0 passed and 0 failed because all 4 modules stopped during collection or setup: test_code.py, test_default.py, test_roles.py, and test_shell.py. The log showed GetPassWarning messages, then said pytest could not read stdin while output capture was active. That proves the no-secret run was not noninteractive; it does not prove why the suite was designed that way or whether assertions would pass after configuration.

First-run credential input blocks unattended verification

The README says the default setup asks for an OpenAI API key and stores it in ~/.config/shell_gpt/.sgptrc. You can use OPENAI_API_KEY instead, which is the better fit for a secret manager or a short-lived shell. Runtime settings cover the endpoint, model, timeout, cache paths, streaming, and function use. The introduction still says GPT-4 is the default, while the config example and v1.5.1 release name gpt-5.4-mini, so pin the model instead of trusting the older sentence.

A local route is possible through Ollama, but ShellGPT's own README says it is not optimized for local models and may misbehave. The Docker example still expects a provider key, an OS name, a shell name, and a cache volume. None of that is difficult, yet it changes the promise from one pip install into a small operating decision: choose where prompts go, where credentials live, and what persists after the command exits.

Function calling can skip the shell-mode confirmation prompt

ShellGPT's function system loads Python classes from a configurable directory and sends their descriptions to the model. The bundled examples include shell execution, and the README warns that a model may run destructive commands. This matters because logs and source piped into the tool can contain instructions that were written by somebody else. A terminal helper that can act on model output should have a confirmation boundary as clear as the one in --shell mode.

Open issue 793 reports a concrete gap in v1.5.1: OPENAI_USE_FUNCTIONS defaults to true, and a model call to execute_shell_command reaches subprocess.Popen(..., shell=True) without Execute or Abort confirmation. The reporter says output is hidden by default as well. The report does not establish that every prompt can trigger an exploit, but it does establish the absence of a user checkpoint once that function call exists. Disable functions or remove that function unless the process runs with disposable files and narrow permissions.

Newer model and multi-tool paths have open failures

Open issue 801 says GPT-5.6 requests return HTTP 400 when functions are enabled because ShellGPT uses Chat Completions and provides no exposed route to the suggested Responses API workaround. The report reproduces the problem on version 1.5.1 and main at a082bd5. Issue 776 describes a separate streaming bug where fragments from 3 tool calls are joined into one malformed payload. Both reports concern optional tool use, but that is also where ShellGPT crosses from answering into acting.

For ordinary prompts, caching can save repeat calls and named chats can preserve up to 100 messages under the documented default. The same files may retain source excerpts, log lines, hostnames, or customer material. A team should set cache paths and retention deliberately, then confirm the provider's data policy before piping production output. Convenience here is real: so is the chance of copying more terminal context than you meant to send.

July code activity supports a trial, not blind execution

GitHub showed 12,288 stars, 89 open issues, and 33 open pull requests on September 28, 2026. The last repository push was July 2, while issue activity continued through September 24. Release 1.5.1 arrived on May 6 with a LiteLLM update, UTF-8 cache handling, empty-stream handling, and the gpt-5.4-mini default. That is recent enough to call the project maintained, though the 122 combined issues and pull requests contain consequential function-path reports.

ShellGPT earns a trial when the job is drafting commands, explaining output, or turning piped text into a quick answer. Our 35-second install and 5-second build keep that trial cheap. Keep generated commands visible, leave execution to a person, disable functions unless you have reviewed every installed one, and run the test suite again with your chosen credential setup. The right failure mode for a terminal assistant is a bad suggestion you reject, not a bad command it runs first.

Alternatives

ProjectWhat it isPick it when
LLM gh↗A command-line and Python toolkit with a plugin system for model providers and tools.pick this instead when provider plugins, structured output, and a query log matter more than ShellGPT's command-execution flow.
aichat gh↗A cross-platform terminal client with multiple providers, roles, sessions, RAG, and tools.pick this instead when broad provider support and agent features matter more than ShellGPT's smaller interface.
Ollama gh↗A local model runner with a command-line client and HTTP API.pick this instead when keeping prompts on your own machine matters more than automatic shell-command generation.

Sources

  1. ShellGPT README
  2. ShellGPT 1.5.1 release
  3. Issue 793: function calls can execute without confirmation
  4. Issue 801: GPT-5.6 function calls return HTTP 400
  5. Issue 776: multiple tool calls produce corrupted output
  6. ShellGPT issues and pull requests

More ai tools reviews

kornia · skills · anarlog · pr-agent · agent-sprite-forge · KiroCrew · the whole board →