shell_sage  by AnswerDotAI

CLI tool for terminal context analysis using LLMs

Created 10 months ago
362 stars

Top 77.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

2 months ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
6 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.