---
title: "Kunya IDE CLI — Multi-Model AI Coding Agent in Your Terminal | Kunya"
url: "https://kunyaai.de/cli"
canonical: "https://kunyaai.de/cli"
updated: "2026-11-30"
language: "de"
category: "DeveloperApplication"
---
# Kunya IDE CLI

> **TL;DR:** Kunya IDE CLI is a terminal-native AI coding agent for macOS, Windows, and Linux that lets developers switch between 100+ frontier models (Claude, GPT, Gemini, Grok, DeepSeek, and KunyaV2 auto-routing) in one session. It installs with a single command and zero Node.js prerequisites, checkpoints every turn with instant /rewind, isolates edits in git worktrees, runs headless in CI/CD with hard dollar budget caps, and starts at $4.99 with pay-as-you-go credit packs (no monthly subscription required) — or is included on paid Kunya plans from $19/month.

## One-Line Installation

### macOS / Linux (zsh, bash, sh · Apple Silicon, Intel & x64/arm64 Linux)
```bash
curl -fsSL https://kunya.ai/install-cli.sh | sh
```
Zero prerequisites — automatically bootstraps a private Node.js 22 runtime if missing and links `kunya`, `kunya-ide`, and `kunya-code`.

### Windows PowerShell (Windows 10 / 11 · PowerShell 5.1+ & pwsh)
```bash
irm https://kunya.ai/install-cli.ps1 | iex
```
Verifies SHA-256 checksum, bootstraps Node.js 22 locally if absent, and adds `kunya.cmd` to your user PATH.

### Direct Bundle (.mjs) (Any machine with Node.js 22+ · air-gapped or CI runners)
```bash
curl -fsSL https://kunya.ai/api/cli/bundle -o kunya-ide.mjs && node kunya-ide.mjs --version
```
Single self-contained ~740 KB ESM bundle with zero external npm dependencies and cryptographic SHA-256 verification via /api/cli/manifest.

## Core Capabilities

- **Switch frontier models mid-session — or let KunyaV2 auto-route** (100+ Models): Use Claude, GPT, Gemini, Grok, DeepSeek, and Kimi inside the same terminal session without juggling separate vendor CLIs or billing accounts. KunyaV2 automatically routes scout, edit, and verify steps to the best cost/quality tier. (`/model claude-sonnet-5-5  ·  --model kunyav2`)
- **Per-turn file checkpoints & instant /rewind** (Instant Safety): Every turn snapshots touched files before writing. If a refactor takes the wrong turn, roll back one step or restore the entire session cleanly with a single command — without dirtying git history. (`/rewind  ·  kunya undo 1`)
- **Isolated git worktrees for risk-free experiments** (Git Native): Run multi-file features in a dedicated git worktree so your active branch stays spotless. Review the full diff, merge back, or discard the branch cleanly when the agent finishes. (`kunya --worktree feat-auth`)
- **Headless CI/CD mode with hard USD spend caps** (Automation): Pipe diffs, test logs, or issue text into non-interactive runs with structured JSON / NDJSON output, turn limits, and strict `--max-budget-usd` guards for GitHub Actions and build pipelines. (`kunya -p "fix failing tests" --max-budget-usd 1.50 --output-format json`)
- **OS sandbox isolation & granular permission modes** (Security): Choose read-only ask mode, interactive approvals, or workspace-write isolation backed by macOS Seatbelt / Linux bwrap, secret redaction, project trust prompts, and team policy enforcement. (`--mode ask  ·  --sandbox workspace-write  ·  kunya doctor`)
- **Built-in MCP server, hooks, and local code intel** (Extensibility): Connect external MCP servers or expose Kunya’s sandboxed file, ripgrep, and edit tools over stdio MCP to Cursor, Claude Desktop, or custom agents. Full workspace rules (`AGENTS.md`, `KUNYA.md`) loaded automatically. (`kunya mcp serve  ·  .kunya/settings.json`)

## Quickstart (60 seconds)

1. **Install Kunya IDE CLI in one command** — Run the macOS/Linux curl script or Windows PowerShell command. The installer verifies the bundle SHA-256 checksum, installs a local Node.js 22 runtime automatically if needed, and links the `kunya` command.
   `curl -fsSL https://kunya.ai/install-cli.sh | sh`
2. **Sign in via browser OAuth or API key** — Run `kunya login` to authorize securely in your browser (supports email, Google, GitHub, and 2FA) or export `KUNYA_API_KEY` for headless CI and SSH environments.
   `kunya login`
3. **Start coding interactively or run headless tasks** — Open any repository and run `kunya` for interactive multi-file agent mode, or pass `-p` with `--max-budget-usd` for scripted CI automation.
   `cd my-project && kunya`

## Essential Commands & Flags

| Command | Purpose |
|---------|---------|
| `kunya` | Launch interactive agent REPL in the current repo |
| `kunya -p "<prompt>"` | Run a non-interactive headless task (CI/CD & scripts) |
| `kunya --worktree <name>` | Run edits inside an isolated git worktree branch |
| `kunya --model <id>` | Pin any model (Claude, GPT, Gemini, DeepSeek, KunyaV2) |
| `kunya --max-budget-usd 2` | Enforce a hard dollar spend cap on the run |
| `kunya login / logout` | Authenticate via browser OAuth, email/2FA, or profiles |
| `kunya doctor` | Check auth, API health, sandbox isolation, PTY, ripgrep & telemetry |
| `kunya update` | Cryptographically verified atomic self-update to latest release |
| `/rewind · /model · /compact` | In-session slash commands for undo, model switching & context compaction |
| `kunya mcp serve` | Expose sandboxed workspace tools over stdio MCP |

## Side-by-Side Comparison (checked 2026-11-30)

| Capability | Kunya IDE CLI | Claude Code | OpenAI Codex CLI | Aider |
|------------|---------------|-------------|------------------|-------|
| AI model choice | 100+ models (Claude, GPT, Gemini, Grok, DeepSeek, KunyaV2 auto-router) | Anthropic Claude models only | OpenAI GPT / Codex models only | Multi-provider via your own BYOK API keys |
| Prerequisites & install | 1-line installer; auto-bootstraps Node.js 22 if missing (~740 KB) | Native installer / npm (Node.js) | npm / Homebrew (Node.js or native binary) | Python 3.9+ / pip / uv |
| Per-turn checkpoints & /rewind | Built-in file snapshots + /rewind & `kunya undo` | Checkpoints & /rewind | Git diff / external git revert | Auto git commits + /undo |
| Isolated git worktrees | Built-in `--worktree` create, diff, merge & remove | Supported via git worktree workflow | Manual git worktree or cloud tasks | Manual git worktree |
| Headless CI + budget cap | `-p`, `--output-format json`, `--max-budget-usd` | `-p`, JSON stream output, max turns / spend | `codex exec` headless mode | `--message` non-interactive scripting |
| Billing & extra tools included | Pay-as-you-go credit packs from $4.99 (no subscription required) or paid plans from $19/mo — shared credits across Web, Desktop, CLI, API & media | Claude Pro ($20/mo) / Max ($100–$200/mo) or Anthropic API | ChatGPT Plus ($20/mo) / Pro ($200/mo) or OpenAI API | Open-source tool; pay each model provider API separately |

- Full Claude Code comparison: https://kunya.ai/alternatives/claude-code-alternative
- Full OpenAI Codex CLI comparison: https://kunya.ai/alternatives/codex-cli-alternative
- Best AI coding CLI guide: https://kunya.ai/answers/best-ai-coding-cli-terminal-agent

## Pricing & Access

- **Pay-as-you-go credits (no subscription required):** Buy a one-time credit pack starting at **$4.99 (375 credits)** to unlock Kunya IDE CLI and the full model catalog with zero recurring commitment.
- **Optional monthly plans:** Also included on any paid Kunya plan starting at **Starter ($19/month)** or **Professional ($29.99/month)**.
- Uses the same metered credit balance as Kunya Web, Desktop IDE, Mobile, and the REST API — zero separate CLI seat fee.
- Full pricing: https://kunya.ai/pricing

## Frequently Asked Questions

### What is Kunya IDE CLI?
Kunya IDE CLI is a cross-platform terminal AI coding agent for macOS, Windows, and Linux. It reads and edits multi-file codebases, runs shell commands inside an optional OS sandbox, saves per-turn checkpoints for instant /rewind, and lets you switch across 100+ AI models (including Claude, GPT, Gemini, DeepSeek, and KunyaV2 auto-routing) from one account.

### How is Kunya IDE CLI different from Claude Code and OpenAI Codex CLI?
Claude Code is locked to Anthropic models and OpenAI Codex CLI is locked to OpenAI models. Kunya IDE CLI gives you a single terminal workflow across 100+ models from Anthropic, OpenAI, Google, xAI, DeepSeek, and Kimi — plus automatic KunyaV2 routing, isolated git worktrees, hard USD budget caps, and shared credits that also cover Kunya Web, Desktop IDE, Mobile, and the REST API.

### Do I need Node.js or Python installed first?
No. The one-line installers for macOS, Linux, and Windows automatically verify the bundle SHA-256 checksum and bootstrap a private Node.js 22 runtime inside ~/.kunya/cli if Node.js 22+ is not already on your system.

### How much does Kunya IDE CLI cost?
Kunya IDE CLI starts at $4.99 with a one-time pay-as-you-go credit pack (375 credits, no monthly subscription required) — or is included on any paid Kunya plan starting at Starter ($19/month) or Professional ($29.99/month). Purchased credits unlock the CLI and full model catalog immediately, never expire at month-end, and share the same transparent balance across Kunya Web, Desktop IDE, Mobile, and the API with no separate CLI seat fee.

### Can I run Kunya IDE CLI in CI/CD pipelines like GitHub Actions?
Yes. Authenticate with the `KUNYA_API_KEY` environment variable and pass `-p "<prompt>"` along with `--output-format json` (or `stream-json`), `--mode ask` for read-only reviews, and `--max-budget-usd` to guarantee strict cost caps per workflow run.

### How does Kunya IDE CLI protect my code and privacy?
Your files stay on your machine and only relevant snippets are sent to the model you select. Kunya IDE CLI supports OS-level sandboxing (macOS Seatbelt / Linux bwrap), project trust prompts before running project hooks or MCP servers, automatic secret redaction, and strict telemetry opt-out via `KUNYA_DISABLE_TELEMETRY=1` or `DO_NOT_TRACK=1`.

### Does Kunya IDE CLI support MCP and custom workspace rules?
Yes. Kunya IDE CLI automatically reads `AGENTS.md`, `KUNYA.md`, and `.cursor/rules` instructions, connects to project or user MCP servers, and can also run as a stdio MCP server itself via `kunya mcp serve`.
