Skip to main content

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.

PyPI version

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:

  1. For Google Gemini (preferred):
export GOOGLEAI_API_KEY='your-gemini-api-key'
  1. 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:

  1. Clone the repository:
git clone https://github.com/yourusername/toni.git
cd toni
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate
  1. Install for development:
pip install -e ".[dev]"
  1. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toni_cli-0.1.9.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

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

toni_cli-0.1.9-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file toni_cli-0.1.9.tar.gz.

File metadata

  • Download URL: toni_cli-0.1.9.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for toni_cli-0.1.9.tar.gz
Algorithm Hash digest
SHA256 dfd6adb97ea709eb086c4d2fbb194908e441b0b5c6f1d144fac946e97e60b03e
MD5 7ce59808dd3cec002b0e3d950889626e
BLAKE2b-256 b90d122df4786ef4c34b69417213b9bacb3d0d4d39b159999d826f4882ebe077

See more details on using hashes here.

File details

Details for the file toni_cli-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: toni_cli-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for toni_cli-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 61912ace4518bb24ef1a0b0370842d6c1276f2653a45590d832e9fb097c9db5d
MD5 caabcc29d77f4b4df3c228b374ed775d
BLAKE2b-256 cd9f9f7877e650f064e784975f50b54bebc05eda5e3c2f0b3eeff2e54a47b194

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