// the find
ricklamers/shell-ai
LangChain powered shell command generator and runner CLI
shell-ai is a CLI tool that takes natural language input and suggests shell commands to run. You type what you want to do, pick from 3 generated options, and it executes. Aimed at developers who frequently forget exact flag syntax or work across unfamiliar tooling.
Supports multiple backends out of the box — OpenAI, Ollama, Groq, Mistral, Azure — with a simple config file swap, so you're not locked into one provider. The interactive picker using InquirerPy is a good UX decision: you stay in control rather than having commands run blindly. Parallel suggestion generation (see parallel_suggestions.py) means the 3 options come back faster than sequential calls. Config file at a predictable path means you can set it once and forget it.
LangChain is a heavy dependency for what amounts to a single-turn prompt with a structured output — the abstraction costs more than it gives here, and LangChain's own API has broken backward compat repeatedly. The 'context mode' (CTX=true) sends terminal output to the API but the docs don't explain what gets sent, how much, or what privacy tradeoffs you're making — bad for anyone on a corporate machine. No shell detection means it can suggest bash syntax on a fish or PowerShell session. The repo has a single main.py doing most of the work with minimal tests, so any edge case in parsing or provider handling is going to fail silently at runtime.