fish-ai  by Realiserad

CLI tool adds AI functionality to Fish shell

created 1 year ago
329 stars

Top 84.2% on sourcepulse

GitHubView on GitHub
Project Summary

fish-ai enhances the Fish shell with Large Language Model (LLM) capabilities, enabling users to convert natural language comments into shell commands, generate explanations for existing commands, and receive intelligent command autocompletions. It targets Fish shell users seeking to reduce time spent on documentation and debugging, offering a streamlined workflow via keyboard shortcuts.

How It Works

The plugin integrates with various LLM providers (OpenAI, Azure OpenAI, Hugging Face, Mistral, Anthropic, Cohere, DeepSeek, Groq, Google, OpenRouter, and self-hosted models) via an OpenAI-compatible API. It leverages Fish shell's scripting capabilities and the fzf fuzzy finder for interactive command completion and refinement. Key features include command generation from comments, command explanation, typo correction (similar to thefuck), and context-aware autocompletion, optionally using command history or pipe output.

Quick Start & Requirements

  • Install with fisher install realiserad/fish-ai.
  • Requires git and either uv or Python with pip and venv.
  • Configuration involves creating ~/.config/fish-ai.ini to specify LLM provider and API keys.
  • Demo: https://github.com/Realiserad/fish-ai#readme

Highlighted Details

  • Supports a wide range of LLM providers, including self-hosted options.
  • Integrates seamlessly with fzf for interactive completions.
  • Offers features like command fixing, comment-to-command, and command-to-comment.
  • Allows customization of LLM behavior (temperature, number of completions, history usage).

Maintenance & Community

  • Developed by Realiserad.
  • Codebase is approximately 2000 lines, intended for easy auditing.
  • Encourages contributions via Pull Requests.

Licensing & Compatibility

  • The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is undetermined.

Limitations & Caveats

  • The lack of an explicit license poses a significant adoption risk for commercial or closed-source projects.
  • Data privacy concerns are noted, with a recommendation to use self-hosted LLMs for sensitive environments.
  • Some LLM providers or models may not support all configuration options (e.g., temperature).
Health Check
Last commit

13 hours ago

Responsiveness

1 day

Pull Requests (30d)
25
Issues (30d)
11
Star History
72 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.