Oscar's Shell is an interactive AI-powered shell assistant designed to run within a Zsh instance. It leverages a pseudoterminal (PTY) to provide real-time assistance and feedback by linking the shell with an AI assistant. This integration is achieved using inter-process communication (IPC), allowing seamless interaction between the shell and the AI assistant.
- Real-time AI Assistance: Get instant feedback and recommendations from the AI assistant while working in the shell.
- Seamless Integration with Zsh: Designed specifically for Zsh users to enhance productivity.
- Interactive PTY Support: The shell and AI communicate through a pseudoterminal for a responsive experience.
- Customizable AI Model: Configure your preferred AI model and API key in
config.json. - Cross-Platform GUI: The AI assistant window is powered by
tkandpywebviewfor a smooth user experience.
Ensure you have the following dependencies installed:
openai
tk
pywebview
Oscar's Shell is specifically designed for use with the Zsh shell.
- Clone the repository:
git clone <repository-url> cd <repository-folder>
- Set up a virtual environment:
python3 -m venv .venv source .venv/bin/activate - Install dependencies:
pip3 install -r requirements.txt
Before running Oscar's Shell, configure your AI model and API key:
- Open
config.json - Set your API key and model preferences
Example:
{
"api_key": "your_openai_api_key",
"model": "stream-enabled model"
}To start the interactive AI-powered shell:
python3 src/main.pyOnce launched, the AI assistant window will open alongside the shell, allowing real-time interaction and feedback while executing commands.
Contributions are welcome! If you’d like to enhance the project, feel free to submit pull requests or report issues.
This project is provided "as is" without any warranty or guarantee. Use at your own discretion.
For further improvements or support, feel free to open an issue in the repository!