← all repositories
ricklamers/shell-ai

Your shell, but you describe the intent and it guesses the syntax

A CLI that turns "terraform dry run thingy" into actual commands via LLM, then asks before it runs them.

1.2k stars Python Coding AssistantsAgents
shell-ai
Velocity · 7d
+1.1
★ / day
Trend
steady
star history

What it does

Shell-AI (shai) is a Python CLI that takes a vague natural-language prompt—think “terraform dry run thingy”—and asks an LLM to suggest one-line shell commands that might do what you meant. It presents a few options, waits for you to pick one, and can execute it. Under the hood it’s LangChain for the LLM plumbing and InquirerPy for the terminal UI.

The interesting bit

The project is essentially thin glue between two mature libraries, but the configuration surface is surprisingly broad: OpenAI, Azure, Groq, Ollama, Mistral, and generic OpenAI-compatible endpoints are all supported through a mix of environment variables and a JSON config file. The default provider is Groq, not OpenAI, which is a small but notable choice.

Key highlights

  • Supports multiple backends: OpenAI, Azure, Groq, Ollama, Mistral, and generic OpenAI-compatible APIs
  • Configurable via ~/.config/shell-ai/config.json or environment variables; config file overrides env vars
  • Optional context mode (CTX) sends previous outputs back to the API for multi-turn refinement
  • Can skip confirmation and shell-history writing for fully automated (and fully trusting) workflows
  • Cross-platform: Linux (Python 3.10+), macOS, Windows

Caveats

  • The README’s own usage example shows the LLM returning redundant suggestions (terraform plan appears twice), so the “3 suggestions” feature can feel like padding
  • The author notes the implementation “can be made much smarter,” which is a candid admission that this is early-stage glue code
  • No mention of local caching, cost estimation, or sandboxing before execution

Verdict

Worth a look if you frequently blank on exact CLI flags and want a quick LLM-assisted crutch. Skip it if you already know your tools, value deterministic behavior, or worry about sending shell intent to third-party APIs.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.