Ninja CLI is a high-performance terminal assistant that bridges the gap between natural language and system execution. Powered by state-of-the-art LLMs, it allows you to build, manage, and automate your development workflow using simple conversational commands.
Project description
🥷 Ninja CLI
The Modern, AI-Powered Command Line Interface
Ninja CLI is a high-performance terminal assistant that bridges the gap between natural language and system execution. Powered by state-of-the-art LLMs, it allows you to build, manage, and automate your development workflow using simple conversational commands.
🚀 Key Features
- Multi-Model Support: Seamlessly switch between OpenAI, Gemini, and OpenRouter.
- Intelligent Execution: Translates your intent into safe, executable shell commands.
- Advanced UI: Features a "Gemini-inspired" aesthetic with real-time status spinners, progress bars, and syntax-highlighted panels.
- Permission Logic: Granular control over restricted commands with a session-wide "Always Allow" bypass for power users.
- Custom Exit Logic: Clean shutdown sequence with automated interrupt signals.
🛠️ Installation
Prerequisites
- Python 3.10+
- uv (Recommended) or
pip
Setup
- Clone the repository:
git clone https://github.com/your-username/ninja-cli.git
cd ninja-cli
- Install using uv: (Fastest):
uv add ninjacli
- Install using pip:
pip install ninjacli
📖 How to Use
1. Launching the AI
Simply type the following command from any directory:
ninjacli
2. Configuration
On the first run, Ninja CLI will guide you through:
- Provider Selection: Choose between OpenAI, Gemini, or OpenRouter.
- API Key Setup: Securely link your API key (stored in your local
.env).
3. Interacting with the Agent
You can ask Ninja CLI to perform complex tasks such as:
- "Create a new React project in a folder named 'dashboard' and install tailwind."
- "Read the content of main.py and tell me if there are any security risks."
- "Find all log files in this directory and delete those older than 7 days."
4. Handling Restricted Commands
For safety, commands like rm or sudo trigger a confirmation prompt:
- [y] Yes: Execute this specific command once.
- [n] No: Skip this command.
- [always] Always Allow: Grants permission for all restricted commands for the remainder of the current session.
⌨️ Useful Shortcuts
| Action | Command / Key |
|---|---|
| New Line | SHIFT + ENTER |
| Exit CLI | Type exit, quit, or bye |
| Force Stop | CTRL + C (Double press) |
| Select API | Arrow Keys + ENTER |
🛡️ Security Note
Ninja CLI performs a directory check on startup. It is highly recommended to run the CLI within a specific project directory rather than your system's root directory to prevent accidental file modifications.
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
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 ninjacli-0.2.0.tar.gz.
File metadata
- Download URL: ninjacli-0.2.0.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab41d3b6e9f3121a7f293b214890f3487d9a5d7710e32e58025f17c42eac5e32
|
|
| MD5 |
39605d2ba07b1ee1bc6fb9339509f798
|
|
| BLAKE2b-256 |
8a47400267af6b725f6947373f2cc30ca11f5e5f47cb1033e536ee76d3f55156
|
File details
Details for the file ninjacli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: ninjacli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd872e32e6f05131f3907a217fe592cc7e0a909523bdfb39c6787ad3b765f17e
|
|
| MD5 |
24c1bde3588a4e2d6d95b8b14e6bd83c
|
|
| BLAKE2b-256 |
682dd02d36b4509b0b9087e0e6219575aa0195f19690fba84d0b597825076c6e
|