Terminal Operation Natural Instruction - AI-powered terminal assistant
Project description
TONI - Terminal Operation Natural Instruction
TONI is a lightweight CLI tool that translates natural language into terminal commands using AI. Simply describe what you want to do, and TONI will suggest the appropriate command for your system.
Inspiration
TONI was inspired by YAI (Yet Another Interpreter), but with a focused approach. While YAI offers a comprehensive terminal experience, TONI is designed specifically to suggest and execute single commands based on natural language descriptions.
Features
- Translates natural language to terminal commands
- Prioritizes Google Gemini AI with OpenAI fallback
- System-aware: Detects whether you're on Linux (Arch, Debian, etc.), macOS, or other systems
- Verifies command availability before execution
- Saves executed commands to ZSH history (when using ZSH)
- Simple to use and install
Installation
# Install from PyPI
pip install toni-cli
# Or with pipx (recommended)
pipx install toni-cli
Configuration
TONI requires at least one API key to function:
- For Google Gemini (preferred):
export GOOGLEAI_API_KEY='your-gemini-api-key'
- For OpenAI (fallback):
export OPENAI_API_KEY='your-openai-api-key'
Add these lines to your shell configuration file (~/.bashrc, ~/.zshrc, etc.) to make them persistent.
Usage
Simply type toni followed by your natural language description:
# Basic file operations
toni list all pdf files in current directory
toni find all files modified in the last 7 days
# System queries
toni show my disk usage
toni what processes are using the most memory
# Complex tasks
toni create a backup of my Documents folder
toni find the largest files in this directory
Examples
$ toni find all python files containing the word "error"
Detected system: Linux (arch)
Suggested command: grep -r "error" --include="*.py" .
Explanation: Search recursively for the word "error" in all Python files in the current directory
Do you want to execute this command? (y/n):
Development
To contribute to TONI:
- Clone the repository:
git clone https://github.com/yourusername/toni.git
cd toni
- Create a virtual environment:
python -m venv venv
source venv/bin/activate
- Install for development:
pip install -e ".[dev]"
- Make your changes and submit a pull request!
License
MIT
Acknowledgements
- YAI for the inspiration
- Google Gemini and OpenAI for their powerful AI APIs
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 toni_cli-0.1.8.tar.gz.
File metadata
- Download URL: toni_cli-0.1.8.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f6da6ec2f0164cc74bb41846ef821ba65a174308da8f00460467431a3b87527
|
|
| MD5 |
501fd16e8c8c404e9dbe6ab327dcc302
|
|
| BLAKE2b-256 |
6b4fffdc403746905f55a7d19ab46178ab5063719b69a9c8fa6137ecbd816566
|
File details
Details for the file toni_cli-0.1.8-py3-none-any.whl.
File metadata
- Download URL: toni_cli-0.1.8-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ded15a7cbadf4f03fa8b6ec891928eff3b0d3d341052a3fb564d62e629c2754b
|
|
| MD5 |
2a54fbcb41f331bfae1a1569e1745286
|
|
| BLAKE2b-256 |
e182c793a3163022a0b98c55b9087551455ff99b3b23847f2dab4bdc38d698af
|