Skip to main content

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

  1. Clone the repository:
git clone https://github.com/your-username/ninja-cli.git
cd ninja-cli
  1. Install using uv: (Fastest):
uv add ninjacli
  1. 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

ninjacli-0.2.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

ninjacli-0.2.1-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file ninjacli-0.2.1.tar.gz.

File metadata

  • Download URL: ninjacli-0.2.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ninjacli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 d55bce9f98da7244a9e79dffdec5b606e65b5eae894e9aa25f47cf4b6f59d179
MD5 0817f31f9e0a3fa727929a9ba7252afb
BLAKE2b-256 aefa65a2393cd1015c7625afe76c2dea8e7c86247b147d372cb5201cd218188e

See more details on using hashes here.

File details

Details for the file ninjacli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: ninjacli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for ninjacli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3dab10b307b3331db187e7950c3d4b2ecb6edaca467327007ca0e50a46a809
MD5 50486548589ebec312f8ea15aef128b6
BLAKE2b-256 cd962ee3ff4167022664ba4b76c09a1e1767dfc38596afe585610b5c8934b066

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