shell_sage  by AnswerDotAI

CLI tool for terminal context analysis using LLMs

Created 1 year ago
398 stars

Top 72.5% on SourcePulse

GitHubView on GitHub
Project Summary

ShellSage provides AI-powered assistance for command-line users, particularly sysadmins, by understanding terminal context and leveraging LLMs like Claude or GPT for shell commands, system administration, Git operations, and more. It enhances productivity by offering real-time, context-aware help directly within the terminal.

How It Works

ShellSage integrates with tmux to read terminal context, enabling it to provide responses based on your current shell state. It supports piping input for direct analysis and can target specific tmux panes for focused assistance. This contextual awareness allows for more relevant and accurate suggestions compared to generic AI assistants.

Quick Start & Requirements

  • Install via pip: pip install shell-sage
  • Prerequisites: ANTHROPIC_API_KEY or OPENAI_API_KEY environment variable.
  • Recommended: tmux with specific configuration for pane ID visibility and enhanced navigation.
  • See: Getting Started

Highlighted Details

  • Supports Claude (default) and OpenAI models, with options for local or alternative LLM providers via base_url.
  • Can log queries and responses to a local SQLite database.
  • Offers advanced use cases for Git, log analysis, Docker management, and database operations.
  • Customizable via ~/.config/shell_sage/shell_sage.conf for default model, history, and logging settings.

Maintenance & Community

  • Built using nbdev.
  • Contribution guidelines available in CONTRIBUTING.md.
  • Issue tracking and feature requests: GitHub Issues

Licensing & Compatibility

  • License: Not explicitly stated in the README.
  • Compatibility: Designed for Linux/macOS environments with tmux.

Limitations & Caveats

The project's license is not specified, which may impact commercial use. While it supports various LLMs, optimal functionality relies on a configured tmux environment.

Health Check
Last Commit

3 days ago

Responsiveness

1 week

Pull Requests (30d)
1
Issues (30d)
3
Star History
5 stars in the last 30 days

Explore Similar Projects

Starred by George Hotz George Hotz(Author of tinygrad; Founder of the tiny corp, comma.ai), Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), and
42 more.

opencode by anomalyco

3.1%
141k
CLI tool for AI-assisted coding in the terminal
Created 11 months ago
Updated 21 hours ago
Feedback? Help us improve.