Credentials. Your OpenAI API key is saved in ~/.config/shell_gpt/.sgptrc, and every prompt is a paid API call.
Who it is forAnyone who forgets find, ffmpeg or docker flags and is tired of searching for them.
The problemLooking up command syntax breaks your flow and leads to copy-pasting commands you do not understand.
The outcomeA command tailored to your OS and shell, shown before it runs so you can check it.
What you need first
- Python and pip
- An OpenAI API key, stored in ~/.config/shell_gpt/.sgptrc on first run, or a local backend such as Ollama
- Linux, macOS or Windows with Bash, Zsh, PowerShell or CMD
Steps
- Run
pip install shell-gptand enter your OpenAI API key when prompted - Ask for a command:
sgpt --shell "find all json files in current folder" - Choose [E]xecute, [D]escribe or [A]bort; use Describe when you are not sure what it does
- Install the hotkey with
sgpt --install-integrationand restart your terminal, then press Ctrl+l to turn your input line into a command - Use
--no-interactionto print the command without running it, for example to pipe it to the clipboard
Prompt for your agent
Install TheR1D/shell_gpt, set up the shell integration for my <bash or zsh>, and show me three examples of sgpt --shell for tasks I do often: <tasks>. Always choose Describe before Execute.
Caveat. Generated commands can be wrong or destructive, so read each one before choosing Execute, especially anything with sudo.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for TheR1D/shell_gpt and "Turn plain English into shell commands you can run"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer