A CLI assistant powered by OpenAI
Project description
Solai - Your Smart CLI Assistant
Solai is an AI-powered command-line interface assistant that helps you find and execute the right commands for your tasks. It uses OpenAI's GPT to convert natural language queries into system commands, with built-in safety confirmations and OS-specific command generation.
It came in a dream. "Thank you for this gift."
Features
- 🤖 Natural language to CLI command conversion
- 💡 Command explanations for better understanding
- ✅ Command confirmation before execution
- 🔒 Secure API key storage
- 💻 OS-specific command generation (macOS, Linux, Windows)
- 🎨 Rich terminal output formatting
Installation
Option 1: Install from PyPI (Recommended)
pip install solai
Option 2: Install from Source
- Clone the repository:
git clone https://github.com/caraveo/solai.git
cd solai
pip install -e .
Quick Start
-
First-time setup will prompt for your OpenAI API key
- Get your API key from: https://platform.openai.com/api-keys
- The key will be securely stored in
~/.solai.env
-
Run a command:
sol find large files
Example output:
Suggested command:
find ~ -type f -size +100M
→ Searches your home directory for files larger than 100 megabytes
Do you want to execute this command? [y/n]:
Usage Examples
# Find files
sol find all pdf files in downloads
# System maintenance
sol clean up system cache
# Network commands
sol check if google.com is up
# File operations
sol create a backup of my documents
Development
To install in development mode:
git clone https://github.com/caraveo/solai.git
cd solai
pip install -e .
Requirements
- Python 3.6+
- OpenAI API key
- Required packages:
- click
- python-dotenv
- openai
- rich
Configuration
The OpenAI API key is stored in ~/.solai.env. To update it, simply delete this file and run any sol command to trigger the setup process again.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -am 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
MIT License
Contact
Jon Caraveo - jon@ziavision.com
Project Link: https://github.com/caraveo/solai
Project details
Release history Release notifications | RSS feed
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 solai-0.1.0.tar.gz.
File metadata
- Download URL: solai-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06172b3197d47377450f9c2318ed454fc4540e9a0db280d0726e82ac66b83e4b
|
|
| MD5 |
8177739463cc8630dd38b434d2fe6215
|
|
| BLAKE2b-256 |
938aebf7435c269a5167cca50b2f0c78136aefb1f5c802ff8cd8205072ada8a7
|
File details
Details for the file solai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: solai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 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 |
c7bb2cb624df1055bf2312156f985641c7da5c982ab2cc08a61c9a41a69eb78d
|
|
| MD5 |
ae0361470d8c7e54cef08495821fc3a1
|
|
| BLAKE2b-256 |
91bc665f5f4d019c99993810ffaa0310995f07a9a8156392cd5f0b0981aacdcf
|