smartcat  by efugier

CLI tool for integrating LLMs into the Unix ecosystem via text streams

created 1 year ago
509 stars

Top 62.1% on sourcepulse

GitHubView on GitHub
Project Summary

This CLI tool integrates Large Language Models (LLMs) into the Unix command-line ecosystem, enabling power users to leverage LLMs within existing workflows. It targets developers and sysadmins who want to automate tasks, refactor code, or generate content directly from their terminal, offering a flexible and configurable experience.

How It Works

Smartcat acts as a bridge between Unix pipes and LLM APIs. It processes text streams, allowing users to pipe output from one command into an LLM for transformation, analysis, or generation, and then pipe the LLM's output to another command or file. It supports custom prompt templates and conversation history, adhering to the Unix philosophy of small, composable tools.

Quick Start & Requirements

  • Install via cargo install smartcat or pacman -S smartcat (Arch Linux). Binaries are available on the releases page.
  • Requires a Rust and Cargo setup for source installation.
  • Supports Ollama (local), Anthropic, Azure OpenAI, Groq, Mistral AI, and OpenAI APIs.
  • Configuration involves setting up API keys or a local Ollama instance. See Configuration and Ollama setup.

Highlighted Details

  • Seamless integration with editors like Vim and Helix/Kakoune for in-place text transformation.
  • Supports glob expressions for including multiple files as context.
  • Highly configurable via TOML files for API endpoints, models, and prompt templates.
  • Conversation history and context management for multi-turn interactions.

Maintenance & Community

  • Project maintained by efugier.
  • Contributions are welcomed via CONTRIBUTING.md.

Licensing & Compatibility

  • Licensed under the MIT License.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

Local LLM performance may be slow depending on the user's setup. The project recommends third-party APIs for optimal workflow speed.

Health Check
Last commit

5 months ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.