mrkeyoor.com_
Thu 17 Sept 22:02 UTC
AI Toolsevaluationupdated 26 Aug 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 chat sessions, installs Bash or Zsh hotkeys, caches replies, and can expose Python functions for the model to call.

+10stars / 7d
Verdict

Our ShellGPT install took 38 seconds and 61 MB, but all 4 test modules failed during collection before a single test passed. The CLI remains useful as a command suggestion and text-piping tool if execution stays manual and function calling is disabled or tightly reviewed. Do not enable its shell-executing function on an important workstation until issue 793 is resolved and independently tested.

We ran it

Lab card: what happened when we ran shell_gptScreenshot of shell_gpt (github.com/TheR1D/shell_gpt)
Install✓ · 38s53 packages · 61 MB
Build✓ · 9s
Tests✗ · 8s0 passed · 0 failed · 4 errors of 4 (pytest)
Known vulns0(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 38 seconds (53 packages), and the build succeeded in 9 seconds. We cloned commit a082bd5 into a clean Debian container with 3 CPUs and no project-specific setup.

Do shell_gpt's tests pass?

Yes: 0 of 4 passed when we ran the project's own test command (pytest), with 4 collection errors. Some failures need services or credentials a bare container does not have.

Does shell_gpt have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use shell_gpt?

Anyone expecting safe command execution from the default function settings: open issue 793 reports that execute_shell_command can run model-proposed commands without confirmation when function calling is enabled.

What are the alternatives to shell_gpt?

LLM, aichat, Ollama. Our ShellGPT install took 38 seconds and 61 MB, but all 4 test modules failed during collection before a single test passed.

Setup3/5Small install; provider setup blocked all 4 test modules
Docs4/5Modes and config are detailed, though the default-model text conflicts
Community4/512,259 stars with active discussion and 118 open issues and PRs
Maturity2/5v1.5.1 is usable, but default function execution needs review

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 but will inspect every command before execution.
Developers who need a small CLI for piping diffs, logs, or documents to an OpenAI-compatible model.
People who prefer named chat sessions and local response caching over a browser chat.
Teams prepared to lock down function calling, provider credentials, and sensitive stdin.

Who it’s NOT for

Anyone expecting safe command execution from the default function settings: open issue 793 reports that execute_shell_command can run model-proposed commands without confirmation when function calling is enabled.
Users who assume local models are a first-class offline path: the README says ShellGPT is not optimized for local models and may not work as expected.
Shared-account environments where an API key must not live in a user config file: the default setup stores the key in ~/.config/shell_gpt/.sgptrc.
Teams that require a clean test result without interactive setup: all 4 test modules errored during collection in our no-secret sandbox.
Developers sending confidential logs or code without a provider and retention policy: piped content goes to the configured model endpoint and replies may be cached locally.

Setup reality

Our Python install succeeded in 38 seconds, adding 53 packages and using 61 MB. The build passed in 9 seconds. Tests failed after 8 seconds: 0 passed, 0 failed, and all 4 modules hit collection or setup errors.

The error log showed getpass warnings and pytest refusing stdin reads while output capture was active. Normal use needs an OpenAI API key or another configured backend. The README's Ollama path needs a separate local server and carries a compatibility warning.

The 0.1 MB checkout held 42 files and about 2,758 source lines. It had 4 CI workflows, a Dockerfile, and a tests directory. Pip-audit found 0 known vulnerabilities. Shell integration edits Bash or Zsh startup files, and chat and response caches need deliberate storage paths.

ShellGPT turns terminal input into prose, code, or commands

ShellGPT is easy to understand at its safest setting. Run sgpt with a question, pipe a log or diff into it, or ask for code-only output. Shell mode asks the model for one command tailored to the detected operating system and shell, then presents Execute, Modify, Describe, and Abort choices. Chat and REPL modes retain conversation state, while named roles let users set a reusable response instruction.

The shell integration goes a step further by adding a hotkey to Bash or Zsh startup files. Pressing the configured key sends the current command line as a prompt and replaces the terminal buffer with the suggestion. The user can edit it before pressing Enter. That is the right interaction model for generated commands: the model drafts, the shell displays, and the operator owns execution. PowerShell is supported as a shell for suggestions, though the documented hotkey installer targets Bash and Zsh.

The 61 MB install is small, while provider setup is unavoidable

Our sandbox installed 53 Python packages in 38 seconds and used 61 MB. The project build completed in 9 seconds. Pip-audit found 0 known vulnerabilities in the installed dependencies. The checkout itself was 0.1 MB with 42 files and roughly 2,758 source lines, making this one of the easiest repositories in the batch to inspect and package.

Default setup prompts for an OpenAI API key and stores it in ~/.config/shell_gpt/.sgptrc; an environment variable can supply it instead. API use is billed by the provider. The README also documents an Ollama route, but warns that ShellGPT is not optimized for local models. Other compatible endpoints can be selected through the base URL, model, and LiteLLM settings, yet issue 578 records an LM Studio compatibility failure that remained open.

What happened when we ran it

Our test command exited with code 1 after 8 seconds. Pytest reported 0 passed, 0 failed, and 4 collection or setup errors out of 4. The errors covered tests/test_code.py, test_default.py, test_roles.py, and test_shell.py. Each said pytest could not read stdin while output was captured and suggested using -s.

The log also contained 4 GetPassWarning messages from Python's getpass, saying it could not control terminal echo. That is the complete diagnosis available in the supplied tail. We did not inject a key or change capture settings, so no functional assertion ran and no live model request was made. The 9-second build proves the package can be assembled at commit a082bd5; it does not verify code generation, shell safety, caching, or provider compatibility.

Function calling bypasses the safer shell confirmation path

Shell mode shows a generated command and asks before execution. The optional function system is different. Users can install Python functions whose names and docstrings are sent to the model, and one bundled example exposes arbitrary shell execution. The README itself warns that a model may run destructive commands and tells users to proceed at their own risk.

Open issue 793 makes the concern specific. It reports that function calling is enabled by default through OPENAI_USE_FUNCTIONS=true, and that the execute_shell_command function runs a model-proposed string with shell=True without the Execute or Abort prompt used by shell mode. The report says function output is hidden by default as well. Until that behavior changes, set function use to false, remove the executing function, or run ShellGPT inside a disposable environment with narrow permissions.

Piped logs leave the machine and replies stay in local caches

A convenient example sends docker logs to the model for diagnosis. Another pipes git diff to produce a commit message. Both can contain secrets, customer data, internal hostnames, or unreleased source. ShellGPT sends the prompt to the configured model endpoint. Teams should choose an approved provider route, redact inputs, and avoid shell-history expansion that inserts more data than intended.

Responses and chat sessions can also persist locally. The config includes separate request and chat cache paths, with a default chat length of 100 messages and request caching enabled. That state is useful for continuity and cost control, but it belongs outside shared temporary directories when prompts are sensitive. File permissions, retention, backup, and deletion should be part of setup rather than left to defaults.

Current model documentation conflicts inside the same README

The installation section still says ShellGPT uses GPT-4 by default. Farther down, the runtime configuration example sets DEFAULT_MODEL=gpt-5.4-mini, and release 1.5.1 says it changed the default to that model. The release was published May 6, 2026. Users should trust the installed version's generated config and release notes over the older introductory sentence, then pin a model explicitly if reproducibility matters.

GitHub showed 12,259 stars, 118 combined open issues and pull requests, and a last repository push on July 2, 2026. Issue 793 was opened on August 5, showing ongoing user scrutiny after that push. ShellGPT remains a handy terminal front end, but its most consequential capability is also its sharpest edge. Keep it in suggestion mode, inspect every command, and treat functions as executable code rather than chat features.

Alternatives

ProjectWhat it isPick it when
LLM gh↗A command-line and Python toolkit for running prompts through pluggable model providers.pick this instead when provider plugins, structured data, and a query log matter more than shell-command execution.
aichat gh↗A cross-platform terminal client for multiple LLM providers, roles, sessions, and tools.pick this instead when broad provider and agent support matters more than ShellGPT's compact shell mode.
Ollama gh↗A local model runner with a CLI and HTTP API.pick this instead when keeping prompts on your own machine matters more than automatic command generation and hosted-model defaults.

Sources

  1. ShellGPT README
  2. ShellGPT 1.5.1 release
  3. Issue 793: unconfirmed function-call execution
  4. Issue 578: LM Studio compatibility
  5. ShellGPT repository metadata

More ai tools reviews

rowboat · skills · superpowers-zh · yolov5 · eve · MemOS · the whole board →