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.
-
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows use .venv\\Scripts\\activate
-
Install dependencies:
Using pypi:
pip install shmate
Using
requirements.txt:pip install -r requirements.txt
Or using
pyproject.tomlfor modern setups:pip install .
-
Environment Setup: Configure your
.envfile. Refer to.env.examplefor required variables. A script to make this easier will be added soon.
Usage
Run the application using:
shellmate
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file shmate-0.2.0.tar.gz.
File metadata
- Download URL: shmate-0.2.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffdbced0760b4a47388261622c2b7ea067279fd063a9c2d373da700db9b1bdf7
|
|
| MD5 |
b8648174e65725ed1950aa9c3fcbe11c
|
|
| BLAKE2b-256 |
f51cc5642cf7b35c8d8c3918a8fd9d230e8d9fec5ababc1bd7dd7ab1200bf195
|
File details
Details for the file shmate-0.2.0-py3-none-any.whl.
File metadata
- Download URL: shmate-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f342966f782e8bc1ade9b4c79ff3c1f02a8b163ed14b79829abae52b3d0cd71
|
|
| MD5 |
cf16c7751cd9d3cf9cdc927ae562349a
|
|
| BLAKE2b-256 |
196bea617012806ca8f9f1363ecbf6e773b4cfbefb34a9c70fc4e72178d129f9
|