ShellGPT

An open-source AI terminal assistant that generates commands and code on Linux, macOS and Windows, with OpenAI API and Ollama integration.

ShellGPT is an AI terminal assistant for developers and others who want help writing commands and code without leaving the shell.

  • Command generation: Turn plain-language requests into shell commands you can review or execute; Bash and Zsh integrations place suggestions in the input line for editing.
  • Code and documentation: Generate code snippets and documentation, with a code-only mode when you don't want accompanying prose.
  • Piped input: Pass text from other terminal tools into a prompt, so requests can include the material you're working with.
  • Ongoing conversations: Keep context across follow-up requests in saved chat sessions or interactive chat, and use custom roles to tailor responses to a task.
  • Function calling: Through OpenAI's function-calling capability, the model can invoke user-defined functions on your machine.

The MIT-licensed application runs on Linux, macOS and Windows, and supports Docker. It's compatible with shells including PowerShell, CMD, Bash and Zsh. By default, prompts go to OpenAI's paid API, which requires an API key and internet access. Azure and Ollama integrations are also available. A local response cache can reuse answers to identical requests.

Similar to ShellGPT