Skip to main content

A command-line application integrating with OpenAI's API.

Project description

ShellMate

ShellMate is a command-line application that interfaces with OpenAI's API to execute shell commands and provide intelligent responses. It orchestrates chat management, command extraction, and response handling to offer a seamless user experience.

Key Components

  • main.py: The entry point for the application. Sets up the environment and initiates interactions with OpenAI's API.
  • chat_manager.py: Manages chat interactions and error handling. Utilizes environment configs for system prompts.
  • extractcmd.py: Extracts shell commands from input strings using regular expressions.
  • stream_handler.py: Handles AI response streams, processing data chunks and managing animations.
  • shell.py: Executes shell commands, logs activities, and captures execution results.
  • thinkinganimation.py: Provides spinner animations to indicate processing status.

Installation

Ensure Python 3.6+ is installed on your system.

  1. Create and activate a virtual environment:

    python -m venv .venv
    source .venv/bin/activate  # On Windows use .venv\\Scripts\\activate
    
  2. Install dependencies:

    Using requirements.txt:

    pip install -r requirements.txt
    

    Or using pyproject.toml for modern setups:

    pip install .
    
  3. Environment Setup: Configure your .env file. Refer to .env.example for required variables.

Usage

Run the application using:

python main.py

Follow the on-screen prompts to interact with the AI model, execute commands, and receive feedback.

License

This project is licensed under the MIT License. See the LICENSE file for more 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

shmate-0.1.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shmate-0.1.0-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file shmate-0.1.0.tar.gz.

File metadata

  • Download URL: shmate-0.1.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for shmate-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4b6d0304843edf699335e741878971bfd27bf4dd20e1ee9381add38800d29a9b
MD5 a2f70f0420244270ed541e1ba872aed3
BLAKE2b-256 2a1fc9ffe121359dd490a8934bd91e7f7c8e21069d7bed479ffed71123da093d

See more details on using hashes here.

File details

Details for the file shmate-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shmate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for shmate-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11415427259f3d2b6fa425b3e04f6dfad82debaaa25a38a418516a63bbcdabd2
MD5 55e94aa58adeccd6bedf1c819e993cfa
BLAKE2b-256 60477d0109ef25b9b38e13ab5483c644d76c096cd8a0045074cb0c32ed502eb9

See more details on using hashes here.

Supported by

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