shell-ai  by ricklamers

CLI tool for natural language to shell command translation

Created 2 years ago
1,132 stars

Top 34.0% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

Shell-AI is a command-line interface utility that translates natural language requests into executable shell commands. It is designed for developers and power users seeking to streamline their workflow by leveraging AI for command generation. The tool offers interactive suggestions and supports multiple LLM providers for flexibility.

How It Works

Shell-AI utilizes LangChain to interface with Large Language Models (LLMs), enabling it to understand natural language prompts and generate relevant shell commands. It employs InquirerPy for an interactive command-line experience, presenting users with multiple command suggestions. The architecture supports various LLM backends, including OpenAI, Azure OpenAI, Groq, and Ollama, allowing users to choose their preferred API or local model.

Quick Start & Requirements

  • Install via pip: pip install shell-ai
  • Requires Python 3.10+ on Linux.
  • Configuration via environment variables (e.g., OPENAI_API_KEY, SHAI_API_PROVIDER) or a config file (~/.config/shell-ai/config.json).
  • Supports OpenAI, Azure OpenAI, Groq, and Ollama APIs.

Highlighted Details

  • Natural language to single-line shell command generation.
  • Cross-platform compatibility (Linux, macOS, Windows).
  • Configurable LLM providers and models.
  • Adjustable suggestion count and temperature settings.

Maintenance & Community

  • MIT License.
  • Open for contributions via Pull Requests.

Licensing & Compatibility

  • Licensed under the MIT License, permitting commercial use and integration with closed-source projects.

Limitations & Caveats

The project is open for contributions, suggesting potential for rapid development but also indicating that certain features or robustness might still be evolving. Specific performance benchmarks or detailed error handling capabilities are not explicitly detailed in the README.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

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

Explore Similar Projects

Feedback? Help us improve.