ninja-cli
01 / 06 · Introduction

// terminal agent · built for small models

The coding agent for the model you already run.

Ninja-CLI is a multi-agent coder for your terminal. Plan with whatever model you trust, ship with a small local one — or stay fully offline on a consumer GPU or Mac mini. One-line install. No accounts, no background service, no monorepo checkout.

install [ .SH ]
Install
$ curl -sfL https://ninja-cli.btaskee.work/install.sh | bash
Mirror
$ curl -sfL https://ninja-cli.pages.dev/install.sh | bash
Run
$ cd your-project && ninja
                
            
          
        
    
     
       
        
      
    
    
    
  
      
       
        
          
    
curl PATH
~18 MB download. That’s the whole install.
zero runtime
No Node. No Python. No daemon to babysit.
desk GPU
Built for the 12 GB card you already own.
bring a model
Any OpenAI-compatible endpoint. Local or cloud.
02 / 06 · Main Features

Everything a coding agent needs. Nothing it doesn’t.

Built for the model that fits on your desk — not the one that requires a cloud bill. Multi-agent by default, local-first by design.

01 [ AGENTS ]

Planner · coder · reviewer

A lean orchestrator plans the work. Fresh coders take one task at a time. Reviewers check the result before it lands.

02 [ LOCAL ]

Small models welcome

Built so a 7B–14B coder on consumer hardware can ship real changes — not just chat about them.

03 [ ROUTING ]

Hybrid model routing

Plan with a strong model, execute with a fast local one. Mix cloud and home lab per role if you want.

04 [ INSTALL ]

One-line install

~18 MB. No Node, no Python, no daemon. Drop it on PATH and go.

05 [ SAFETY ]

Hard shell gate

Every shell command is screened before it runs. Dangerous patterns are denied — even with auto-approve.

06 [ REWIND ]

Instant rollback

Edits are snapshotted first. If a run goes sideways, rewind restores files without archaeology.

07 [ TUI ]

Terminal-native UI

A real TUI for approvals, status, and session flow — not a web wrapper pretending to be a CLI.

08 [ EXTEND ]

MCP + skills

MCP servers as tools. Builtin skills seed on first run; full text loads only when activated.

09 [ RESEARCH ]

Web search & deep research

Serper-backed search and page fetch, a researcher agent, and parallel fan-out for multi-angle questions.

10 [ WORKTREES ]

Parallel without bleed

Optional git worktrees keep concurrent agents on separate branches so contexts stay clean.

11 [ PLAN ]

Multi-model plan panel

Fan a goal across several models with different lenses, then synthesize one plan you can actually ship.

12 [ HEADLESS ]

Headless / CI mode

Run with -p for scripts and pipelines. Text or NDJSON out; policy gate still applies.

session resume human-in-the-loop auto-approve / permissionless strict search/replace edits doctor diagnostics policy dry-run Linux · macOS · Windows
03 / 06 · How it works

Plan big. Execute small.

Most agents share one crowded context for every retry and side quest. Ninja-CLI keeps planning, coding, and review in separate lanes so each step stays focused — and small models stay useful.

you ──▶ orchestrator ──▶ plan
              │
              ├─▶ coder     (fresh context · one task)
              │      │
              │      ▼
              ├─▶ reviewer  (approve / fix loop)
              │      │
              │      ▼
              ├─▶ researcher (web_search · read_url · optional deep_research fan-out)
              │
              └─▶ land      (or rewind if it went sideways)

// shell commands always pass a hard safety gate first
// optional: plan with a panel of models, then synthesize
// optional: deep_research fans 2–6 questions to parallel researchers
[ FOCUS ]

One task at a time

Implementation work runs in short-lived agents that only see the task they were given — then they’re gone.

[ LOOP ]

Review before merge mindset

Code is checked, not one-shot. Fix rounds exist so a small model can recover instead of shipping the first miss.

[ YOU ]

You stay in the loop

Reads can auto-flow; mutations ask. Trust lists and approval modes match how carefully you want to run.

04 / 06 · Runs on

Any OpenAI-compatible endpoint. Yours first.

Point Ninja-CLI at llama.cpp, Ollama, LM Studio, or a cloud API. Defaults aim at a local server so you can start without an account.

Setup Example
12 GB VRAM GPU 7B–14B coder (Qwen, DeepSeek-Coder, Gemma class) via llama.cpp / Ollama / LM Studio
16 GB Apple Silicon Same model class on unified memory — Mac mini friendly
Hybrid Strong model plans; small local model codes and reviews
Cloud only Any OpenAI-compatible API — set base URL, key, model
quick start [ ENV ]
Local
$ export OPENAI_BASE_URL=http://localhost:8080
$ export OPENAI_MODEL=your-local-model
$ ninja
Hybrid
# optional: different model for subagents
$ export NINJA_SUBAGENT_MODEL=your-small-coder
$ export NINJA_SUBAGENT_BASE_URL=http://localhost:8080
05 / 06 · Safety

Autonomy with a hard floor.

Small models are less predictable. Ninja-CLI is built so you can still let them work — with a safety net that doesn’t rely on the model being careful.

  • //Hard deny-set — certain commands never run, regardless of flags or approval mode.
  • //Confirm mutations — write paths and shell work ask unless you explicitly loosen trust.
  • //Snapshots + rewind — edits are reversible when a session takes a wrong turn.
  • //Policy dry-run — check what a command would do before the agent ever sees it.
  • //Doctor — diagnose endpoint, config, and environment offline.
# dry-run the safety pipeline
$ ninja policy check "rm -rf /"
✗ DENY — hard deny-set
$ ninja policy check "go test ./..."
✓ ALLOW — safe read/build path
$ ninja doctor
endpoint reachable
config readable
06 / 06 · Ship it

Ready to run Ninja-CLI?

One curl and ninja is on your PATH. Point it at your model server and open a project. First run writes an annotated config example and seeds builtin skills under your config dir (loadable via activate_skill — not injected into every prompt).

install [ .SH ]
Install
$ curl -sfL https://ninja-cli.btaskee.work/install.sh | bash
Mirror
$ curl -sfL https://ninja-cli.pages.dev/install.sh | bash
Run
$ cd your-project && ninja
♪ Now playing
Ship It All — ZeusAI · ninja-cli theme song