A CLI tool that converts natural language to shell commands using OpenAI's API
Project description
MIA Terminal
A simple, powerful CLI tool that converts natural language to shell commands using OpenAI's API.
Author
Created by Ronny Bruknapp (ronny.bruknapp@digitaltrend.no)
Features
- 🧠 Convert natural language to shell commands
- 🔑 Secure API key storage
- ⚡ Simple, intuitive interface
- 🚀 Cross-platform compatibility (Linux, macOS, Windows)
Installation
You can install mia-terminal directly from PyPI:
pip install mia-terminal
Or install from source:
git clone https://github.com/ronnybru/ai-cmd.git
cd ai-cmd
pip install .
Usage
Using mia is simple:
mia <your natural language prompt>
For example:
mia list all files in the current directory sorted by size
The tool will:
- Convert your natural language to a shell command using OpenAI
- Display the suggested command
- Execute the command when you press ENTER (or cancel with Ctrl+C)
First-time Setup
On first use, you'll be prompted to enter your OpenAI API key. This key is stored securely in your home directory and used for all future requests.
Examples
Here are some examples of what you can do with mia:
# Find large files
mia find files larger than 100MB in my home directory
# Process text
mia count the number of lines in all python files recursively
# System maintenance
mia show me system resource usage sorted by CPU
# Network operations
mia scan open ports on localhost
Configuration
Your OpenAI API key is stored in:
- Linux/macOS:
~/.mia-terminal/config.json - Windows:
C:\Users\<username>\.mia-terminal\config.json
Requirements
- Python 3.6+
- OpenAI API key (get one at https://platform.openai.com/api-keys)
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
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 mia_terminal-0.1.0.tar.gz.
File metadata
- Download URL: mia_terminal-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db18a39c6196f6aeea9328f7a89f68451fe420151d41276c99cdbe1cdc6e28e0
|
|
| MD5 |
d262fdc585005af296b9165898b1e879
|
|
| BLAKE2b-256 |
bf29031c663778185f4d8fffeacfccbfc01c2070dc80343450057f4fb1db89e8
|
File details
Details for the file mia_terminal-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mia_terminal-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faebd9b5ba163f6faf2c59600d047643ca419ce1a2d04b95e9bbfffd6795c8b4
|
|
| MD5 |
86f876f61e66537e355ba3a8b766cf10
|
|
| BLAKE2b-256 |
f0ab953b4dfaa75e68c952b847e14429e5d69f1870f1eb573831a9e05cd509e9
|