Realiserad/fish-ai
Supercharge your command line with LLMs and get shell scripting assistance in Fish. 💪
What it solves
fish-ai is a plugin for the Fish shell that integrates AI-powered command-line assistance. It reduces the need to manually search for complex shell commands, read manpages, or fix typos in commands that failed to execute.
How it works
The plugin connects to a variety of language models (LLMs) via API or self-hosted instances. It captures the current command-line buffer, OS information, and optionally command history or file contents, and sends them to the LLM to generate responses. It uses two primary keyboard shortcuts to trigger these actions: Ctrl + P for transformations and Ctrl + Space for completions and fixes.
Who it’s for
Users of the Fish shell who want to automate the generation of shell commands from natural language comments, get AI-driven autocompletions, or quickly fix broken commands without leaving the terminal.
Highlights
- Bidirectional Transformation: Converts natural language comments into shell commands and vice versa.
- AI-Driven Autocomplete: Uses a built-in fuzzy finder (
fzf) to suggest command completions. - Command Fixes: Suggests corrections for commands that fail to execute.
- Flexible Provider Support: Compatible with Anthropic, Azure OpenAI, Google Gemini, Groq, Cohere, DeepSeek, OpenRouter, and self-hosted models (e.g., via Ollama).
- Privacy-Focused: Includes a redaction system to remove passwords, API keys, and private keys from prompts before they are sent to the LLM.
- Lightweight: Open source and approximately 2000 lines of code for easy auditing.
Related
- Project
- Project
- Project
- Project
- Project