Skip to main content

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:

  1. Convert your natural language to a shell command using OpenAI
  2. Display the suggested command
  3. 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

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.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

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

mia_terminal-0.1.0.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

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

mia_terminal-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

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

Hashes for mia_terminal-0.1.0.tar.gz
Algorithm Hash digest
SHA256 db18a39c6196f6aeea9328f7a89f68451fe420151d41276c99cdbe1cdc6e28e0
MD5 d262fdc585005af296b9165898b1e879
BLAKE2b-256 bf29031c663778185f4d8fffeacfccbfc01c2070dc80343450057f4fb1db89e8

See more details on using hashes here.

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

Hashes for mia_terminal-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 faebd9b5ba163f6faf2c59600d047643ca419ce1a2d04b95e9bbfffd6795c8b4
MD5 86f876f61e66537e355ba3a8b766cf10
BLAKE2b-256 f0ab953b4dfaa75e68c952b847e14429e5d69f1870f1eb573831a9e05cd509e9

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