Skip to main content

No project description provided

Project description

Shell-AI: Your Intelligent Command-Line Companion

PyPI version License: MIT Forks Stars

Shell-AI (shai) is a CLI utility that brings the power of natural language understanding to your command line. Simply input what you want to do in natural language, and shai will suggest single-line commands that achieve your intent. Under the hood, Shell-AI leverages the LangChain for LLM use and builds on the excellent InquirerPy for the interactive CLI.

demo-shell-ai

Installation

You can install Shell-AI directly from PyPI using pip:

pip install shell-ai

After installation, you can invoke the utility using the shai command.

Usage

To use Shell-AI, open your terminal and type:

shai run terraform dry run thingy

Shell-AI will then suggest 3 commands to fulfill your request:

  • terraform plan
  • terraform plan -input=false
  • terraform plan

Features

  • Natural Language Input: Describe what you want to do in plain English (or other supported languages).
  • Command Suggestions: Get single-line command suggestions that accomplish what you asked for.
  • Cross-Platform: Works on Linux, macOS, and Windows.

Configuration

Environment Variables

  1. OPENAI_API_KEY: Required. Set this environment variable to your OpenAI API key. You can find it on your OpenAI Dashboard.

Optional Variables

  1. OPENAI_MODEL: Defaults to gpt-3.5-turbo. You can set it to another OpenAI model if desired.
  2. SHAI_SUGGESTION_COUNT: Defaults to 3. You can set it to specify the number of suggestions to generate.

Configuration File

Alternatively, you can store these variables in a JSON configuration file:

  • For Linux/macOS: Create a file called config.json under ~/.config/shell-ai/
  • For Windows: Create a file called config.json under %APPDATA%\shell-ai\

Example config.json:

{
  "OPENAI_API_KEY": "your_openai_api_key_here",
  "OPENAI_MODEL": "gpt-3.5-turbo",
  "SHAI_SUGGESTION_COUNT": 3
}

The application will read from this file if it exists, overriding any existing environment variables.

Run the application after setting these configurations.

Contributing

This implementation can be made much smarter! Contribute your ideas as Pull Requests and make AI Shell better for everyone.

Contributions are welcome! Please read the CONTRIBUTING.md for guidelines.

License

Shell-AI is licensed under the MIT License. See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shell-ai-0.3.6.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

shell_ai-0.3.6-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file shell-ai-0.3.6.tar.gz.

File metadata

  • Download URL: shell-ai-0.3.6.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for shell-ai-0.3.6.tar.gz
Algorithm Hash digest
SHA256 6d7c6fa5769e65f7c02619e91c9caa02ee7e9dc1503dbe4be67c21439d0cb405
MD5 00c13789082fd6d4307a8db514f61ec1
BLAKE2b-256 2484458c1c229f37c991f4d1e1cd217c3a0d0d931b0707460d4ef46ebe4e0600

See more details on using hashes here.

File details

Details for the file shell_ai-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: shell_ai-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.2

File hashes

Hashes for shell_ai-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 f7132e2f0ef19009a9727a16f5cbbefeaa321173b47ba2114cae6bb9c85be7a3
MD5 eb49c5b88550c4594acf97bb0b6ad4a4
BLAKE2b-256 5fb49d2561c094d3336574f4e48aa1cab8a1cefe01940fd592f500def92898c2

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page