# `kranth-cli`

Premium interactive terminal client for [Kranth](https://kranth.com) — stress-test
ideas against adversarial AI personas without leaving your shell.

```
$ kranth

   ██╗  ██╗██████╗  █████╗ ███╗   ██╗████████╗██╗  ██╗
   ██║ ██╔╝██╔══██╗██╔══██╗████╗  ██║╚══██╔══╝██║  ██║
   █████╔╝ ██████╔╝███████║██╔██╗ ██║   ██║   ███████║
   ██╔═██╗ ██╔══██╗██╔══██║██║╚██╗██║   ██║   ██╔══██║
   ██║  ██╗██║  ██║██║  ██║██║ ╚████║   ██║   ██║  ██║
   ╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═╝╚═╝  ╚═══╝   ╚═╝   ╚═╝  ╚═╝

   Stress-test ideas against adversarial AI personas.
   Type an idea, /help, or /quit.

 ▌ _
```

## Install

| Channel | Command | Status |
|---|---|---|
| curl (universal) | `curl -fsSL https://kranth.com/install.sh \| sh` | ✓ live |
| npm | `npm i -g @kranth/cli` | ✓ live |
| Cargo | `cargo install kranth-cli` | ✓ live |
| Manual download | [github.com/Kranth-ai/kranth-cli/releases/latest](https://github.com/Kranth-ai/kranth-cli/releases/latest) | ✓ live |
| Homebrew | `brew install kranth-ai/tap/kranth` | ✓ live |

## Usage

**Interactive shell (default):**

```bash
kranth                # drops into the REPL — type ideas, get debates back
```

**One-shot mode (CI / scripting):**

```bash
kranth run "Launch a $29/mo Rust devtool"
kranth replay <debate_id>
kranth ls --json
kranth pr https://github.com/me/repo/pull/42
```

## Auth

```bash
kranth login          # device-code flow — opens browser, no keys to copy/paste
kranth whoami         # current account + credit balance
```

For CI / SSH, set `KRANTH_API_KEY=kr_live_…` or pass `--api-key`.

## Interactive shell

Naked `kranth` drops you into a single-screen ratatui app — the **cinema**.
Type any idea, hit Enter, and watch the 10-archetype persona grid light up as
each persona reacts, with a live reaction feed and three sentiment sparklines
underneath. When the verdict drops, the screen dissolves into a centered
verdict card in `tui-big-text` block letters. Esc returns to the prompt.

| Slash command | Effect |
|---|---|
| `/demo` (or `start`) | Run a canned walkthrough — no API call, no credits burned |
| `/help` | Show the command list |
| `/quit` (or Ctrl-D, or Esc on empty prompt) | Exit |

## Environment overrides

| Var | Default | Effect |
|---|---|---|
| `KRANTH_API_KEY` | OS keyring | Bypass the keyring (CI / SSH) |
| `KRANTH_API_URL` | `https://api.kranth.com` | Point at staging / self-hosted |
| `KRANTH_BELL` | `0` | Set to `1` for terminal bell on verdict drop |
| `KRANTH_INSTALL_DIR` | `~/.local/bin` | Override the `install.sh` install path |
| `KRANTH_VERSION` | `latest` | Pin to a specific release |

## License

Apache-2.0 © Kranth AI, Inc.
