butterfish  by bakks

CLI tool for adding AI to your shell

created 2 years ago
435 stars

Top 69.5% on sourcepulse

GitHubView on GitHub
Project Summary

Butterfish is a command-line tool that integrates AI superpowers into your shell (bash, zsh) using OpenAI. It targets developers and power users who spend significant time in the terminal, offering contextual AI assistance for command generation, debugging, and general queries directly within their workflow, eliminating the need for context switching.

How It Works

Butterfish operates by wrapping your existing shell. Users can invoke AI by prefixing commands with a capital letter. The tool leverages shell history as context for AI prompts, enabling natural language queries like "Why did that command fail?" or agent-like execution of tasks with commands starting with "!". This approach provides high-context AI help seamlessly within the terminal.

Quick Start & Requirements

  • Install via Homebrew (brew install bakks/bakks/butterfish) or Go (go install github.com/bakks/butterfish/cmd/butterfish@latest).
  • Requires an OpenAI API key.
  • Tested on macOS; reported to work on Linux.
  • Official documentation: https://github.com/bakks/butterfish

Highlighted Details

  • Shell Mode: Integrates AI prompting and command autosuggestion directly into bash/zsh.
  • Goal Mode: Allows the AI to act as an agent, executing commands to achieve a specified goal (prefixed with !).
  • Embeddings: Supports indexing local files for semantic search and question-answering via embeddings.
  • Prompt Transparency: Allows users to view and configure the prompts sent to the AI via ~/.config/butterfish/prompts.yaml.

Maintenance & Community

  • Open source project on GitHub.
  • MIT License.

Licensing & Compatibility

  • MIT License. Permissive for commercial use and integration with closed-source projects.

Limitations & Caveats

  • Relies on OpenAI API, incurring costs for usage, particularly for autosuggestion.
  • Agent mode (Goal Mode) performance may vary based on goal complexity and requires user guidance for optimal results.
  • Development primarily on macOS; Linux support is reported but untested.
Health Check
Last commit

3 months ago

Responsiveness

1 day

Pull Requests (30d)
1
Issues (30d)
0
Star History
17 stars in the last 90 days

Explore Similar Projects

Starred by Tobi Lutke Tobi Lutke(Cofounder of Shopify), John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), and
12 more.

opencode by sst

8.7%
16k
CLI tool for AI-assisted coding in the terminal
created 3 months ago
updated 4 hours ago
Feedback? Help us improve.