Repolode
Realiserad

Realiserad/fish-ai

A Fish shell plugin that uses LLMs to turn comments into commands, explain commands, fix typos, and autocomplete your command line.

Stars
566
Forks
52
Open issues
1
Last commit
2 days ago

What is it?

fish-ai is a plugin for the Fish shell that connects your command line to a language model. You type a comment such as a description of a task and press a shortcut to get a shell command, or type a command and get a comment explaining what it does. This helps with tools that have many flags, such as git, kubectl and curl.

The plugin can also suggest a fix after a command fails, and it offers autocomplete for commands or comments, with results shown in a bundled fzf fuzzy finder where you can refine suggestions with further instructions. Everything is triggered by configurable keyboard shortcuts, and it is installed with fisher.

The model backend is set in an INI config file. It supports providers such as Anthropic, OpenAI, Google, AWS Bedrock, Groq, Cohere and OpenRouter, as well as any self-hosted OpenAI-compatible server like Ollama. The plugin sends the OS name, the command buffer and related context to the model, and it redacts some sensitive values such as API keys passed as arguments.

Key features

  • 01Turns comments into shell commands and explains existing commands in comments.
  • 02Suggests fixes for failed commands.
  • 03Autocompletes commands with an fzf-based picker that can be refined with instructions.
  • 04Works with many providers, including self-hosted OpenAI-compatible servers.
  • 05Keyboard shortcuts are configurable and no mouse is needed.
  • 06Supports a configurable explanation language and custom HTTP headers.

Use cases

  • Looking up flags for git, kubectl or curl without leaving the terminal.
  • Writing a one-off shell pipeline from a plain-language description.
  • Diagnosing a typo or failed command and getting a corrected version.
  • Running a self-hosted model so command context stays on your machine.

Quick start

  1. 1

    Install git and either uv, or a supported Python with pip and venv

  2. 2

    Install the plugin with fisher

    fisher install realiserad/fish-ai
  3. 3

    Create the configuration file ~/.config/fish-ai.ini with your chosen language model provider

Things to know

  • Requires an API key for a hosted model provider, or a self-hosted model.
  • Sends your command line, OS name, and related command output or file contents to the language model.

In collections

Topics

FAQ

What is fish-ai?
A Fish shell plugin that uses LLMs to turn comments into commands, explain commands, fix typos, and autocomplete your command line. fish-ai is a plugin for the Fish shell that connects your command line to a language model. You type a comment such as a description of a task and press a shortcut to get a shell command, or type a command and get a comment explaining what it does. This helps with tools that have many flags, such as git, kubectl and curl.
Is fish-ai free to use? What license does it have?
fish-ai is open source under the MIT license. Check the license terms before using it in commercial products.
Is fish-ai still maintained?
Actively maintained. The last commit to fish-ai was on Nov 6, 2026.
What can I use fish-ai for?
Looking up flags for git, kubectl or curl without leaving the terminal. Writing a one-off shell pipeline from a plain-language description. Diagnosing a typo or failed command and getting a corrected version. Running a self-hosted model so command context stays on your machine.
How do I install fish-ai?
Install git and either uv, or a supported Python with pip and venv Install the plugin with fisher: fisher install realiserad/fish-ai Create the configuration file ~/.config/fish-ai.ini with your chosen language model provider
Where can I get fish-ai?
The source code and installation instructions are on GitHub: https://github.com/Realiserad/fish-ai

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects