BYOAIK — Bring Your Own AI Key: a directory of AI tools that run on your own API key.

ShellGPT (sgpt)

Natural-language CLI that turns prompts into shell commands, code, and answers via your own LLM key.

Website Source code

Category:
Developer Infrastructure
Pricing:
Open Source
Open source:
Yes (MIT)
Self-hostable:
Yes
Local-first:
Yes
Platforms:
CLI, Self-hosted, Docker
AI providers (bring your own key):
OpenAI, Ollama, Custom / OpenAI-compatible, Anthropic, Google Gemini, Azure OpenAI, Groq, Mistral, Cohere
API key storage:
Configured by environment variable
Key risk level:
LOW
Trust score:
90/100

ShellGPT (sgpt) is an open-source command-line productivity tool that uses large language models to generate shell commands, code snippets, and answers directly in the terminal, with shell integration for Bash, Zsh, and PowerShell on Linux, macOS, and Windows. It is bring-your-own-key by design: on first run it prompts for your own API key and stores it in ~/.config/shell_gpt/.sgptrc, and also reads the OPENAI_API_KEY environment variable. Beyond OpenAI, it supports a configurable API_BASE_URL for any OpenAI-compatible endpoint, and installing the litellm extra (pip install "shell-gpt[litellm]") with USE_LITELLM=true routes requests through LiteLLM to many providers and to local models via Ollama (e.g. DEFAULT_MODEL=ollama/..., API_BASE_URL=http://localhost:11434). No hosted backend or vendor account is required.

How your API key is handled

Your API key is supplied via an environment variable or local config file. Requests are sent directly to the AI provider. Because it can be self-hosted, your key never has to touch a third-party backend.

Setup

Install the tool, set your provider API key as an environment variable (or in its config file), and pick a model.