CLI AI

Why a CLI, not a chat: the design philosophy of CliAI

2026-01-07

Almost every other AI tool for the shell ends up looking like a chat box β€” a sidebar, a popup, a tab. We deliberately didn't build that. Here's why.

The cost of context switching

Every time you leave the terminal to ask a question, you pay three taxes:

  1. Window tax. Hands off the keyboard, eyes off the cursor, focus broken.
  2. Translation tax. Your terminal state β€” pwd, $SHELL, environment variables, the file you just looked at β€” doesn't survive the trip to a browser.
  3. Trust tax. A chat answer arrives without showing what it'll do in your shell. So you re-read it, mentally simulate it, and then copy it back.

A CLI tool collapses all three into one keystroke. The context is right there. The command is generated for the shell you're standing in, not in the abstract.

Three principles

Inspect, then run. CliAI never executes silently. The generated command appears in a panel above the prompt, with a one-line description and a safety badge. You decide.

clai
β”Œβ”€ Task ───────────────────────────────────────────────┐│ print working directory                              β”‚β”œβ”€ Command ─────────────────────────────────────────────│ pwd                                                  β”‚β”œβ”€ Description ─────────────────────────────────────────│ Prints the current working directory.                β”‚β”œβ”€ Shell: bash Β· Safety: SAFE Β· Quota: 1/100 ───────────│ Enter β€” run Β· R β€” refine Β· Esc β€” cancel              β”‚β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Local history. Your prompts and the commands they produced are logged on your machine, not on a server dashboard you have to log in to. clai log --tail 20 shows the last 20.

No browser. CliAI doesn't open a tab, doesn't send you to a UI, doesn't ask for an OAuth flow. The full UX is the terminal you already have.

What we lose

Honest list of trade-offs:

  • No image input. A chat box accepts screenshots; the CLI takes text only.
  • No conversational memory across sessions. Each prompt is independent (you can refine within a single task with R, but the next prompt is fresh).
  • Flat output. No clickable links, no rendered Markdown β€” it's text in a terminal.

We think those are acceptable losses for the speed and predictability you get back.

What we gain

  • Same workflow on any shell. bash, zsh, fish, cmd, PowerShell β€” the post on Windows parity goes deeper.
  • Safety classification before execution. Read more in the safety deep-dive.
  • One muscle. You learn one trigger word β€” clai β€” and use it for everything.

If you haven't tried it yet, the first post has the install one-liner.