AI-powered natural language → terminal command converter
Project description
Yoki CLI — AI-Powered Terminal Tool
Yoki is a powerful CLI tool that allows you to run AI-powered commands directly from your terminal. It connects to Gemini / OpenAI API to generate code, scripts, or automate tasks, providing a smart terminal experience.
⚠️ Note: Yoki is online only. It requires an internet connection and a valid API key.
Features
- 💡 Generate code, scripts, or automation tasks via terminal.
- 🌐 Fully online, powered by Gemini / OpenAI API.
- 🖥️ Works on Windows, Linux, and Mac.
- 🛠️ Modular design—easily add new commands.
- 📦 Simple installation and environment setup.
Table of Contents
- Prerequisites
- Installation
- Environment Setup
- Running Yoki
- Commands
- Adding New Commands
- Contributing
- Folder Structure
- Troubleshooting
- License
Prerequisites
- Python 3.10+
- Git installed
- Internet connection
- OpenAI or Gemini API key
Check Python version:
python --version
Check Git version:
git --version
Installation
Step 1: Clone the Repository
git clone https://github.com/onipinaka/yoki.git
cd yoki
Step 2: Create a Python Virtual Environment
Linux / Mac:
python3 -m venv venv
source venv/bin/activate
Windows (PowerShell):
python -m venv venv
.\venv\Scripts\Activate.ps1
Step 3: Install Dependencies
Upgrade pip first:
pip install --upgrade pip
Install dependencies:
pip install -r requirements.txt
requirements.txt should include:
openai>=1.8.0
requests>=2.31.0
click>=8.1.7
rich>=13.5.2
python-dotenv>=1.0.0
tabulate>=0.9.0
aiohttp>=3.9.0
Environment Setup
Step 4: Configure API Key
- Create a
.envfile in the root directory:
OPENAI_API_KEY=your_openai_api_key_here
- Load the API key in Python:
from dotenv import load_dotenv
import os
load_dotenv()
api_key = os.getenv("OPENAI_API_KEY")
This ensures your API key is secure and not hardcoded.
Running Yoki CLI
Run the CLI:
python yoki.py
Running Commands
You can run AI commands directly:
yoki "generate a Python script to read CSV files"
yoki "summarize this text"
yoki "translate this text to French"
- Commands are interpreted and executed online using Gemini / OpenAI.
- You must have a valid API key in
.env.
Available Commands
| Command | Description |
|---|---|
help |
Lists all available commands |
list |
Shows all registered commands |
generate |
AI-generated scripts or code |
summarize |
Summarize text input |
translate |
Translate text to another language |
example |
Example command to test functionality |
Commands can accept flags:
yoki "generate --lang python --task read_csv"
yoki "translate --lang French 'Hello World'"
Adding New Commands
- Go to the
commands/folder. - Create a Python file, e.g.,
my_command.py. - Add a function named
run(args):
def run(args):
print("Hello from my new command!", args)
- Import and register your command in
commands/__init__.py. - Run it via CLI:
yoki "my_command arg1 arg2"
Contributing
- Fork the repository.
- Create a new branch:
git checkout -b feature/my-new-command
- Add new commands under
commands/. - Update
README.mdif needed. - Test your command:
python yoki.py "my-new-command test"
- Commit your changes:
git add .
git commit -m "Add my new command"
git push origin feature/my-new-command
- Open a Pull Request.
Follow PEP8 style and ensure your code works with the online API.
Folder Structure
yoki/
│
├── yoki.py # Main CLI entry point
├── commands/ # Built-in commands
│ ├── __init__.py # Imports and registers commands
│ └── example.py # Example command
├── requirements.txt # Python dependencies
├── README.md # This file
└── .env # OpenAI API key
Troubleshooting
- Command not found: Make sure your command is registered in
commands/__init__.py. - API key errors: Check
.envfile and ensure key is valid. - No internet connection: Yoki requires online mode; AI commands won't work offline.
- Dependency errors: Run
pip install -r requirements.txtagain.
License
MIT License © 2025 [Your Name]
Notes
- Designed for developers and AI enthusiasts.
- Fully online; works with Gemini / OpenAI API.
- Modular, easy to extend, and beginner-friendly.
- Cross-platform support for Windows, Linux, and Mac.
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 yoki_terminal-1.0.1.tar.gz.
File metadata
- Download URL: yoki_terminal-1.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5290c4b6b0cd1f68af9580149f5dc87a82009122ecaa311a33d108eda53d67fb
|
|
| MD5 |
20184fd53df8879fdad985de6e237132
|
|
| BLAKE2b-256 |
5f4e8880a1a829f4b326a1cca6cf34c574853ebc3129c0b0d3b3d59779d46654
|
File details
Details for the file yoki_terminal-1.0.1-py3-none-any.whl.
File metadata
- Download URL: yoki_terminal-1.0.1-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c08bf16047212b3f5f68e1ce560f1e7a57b1e8ee55ec40a93f4ad35d7a81dee
|
|
| MD5 |
ade5622f73fe7fa969caf62aa9fcfe56
|
|
| BLAKE2b-256 |
0ed6402b9f59e967e94d57c2d47126d9ba882273d832b8e0df4885bea25ec887
|