Your agent can answer CLI prompts.

Many command-line tools stop halfway to ask questions: "Continue?", "Pick an option", "Delete this data?". AI coding agents get stuck there, or answer blindly. TtySage answers the safe questions for them and asks you before anything that could cost you data.

See the demoSet up in a minute
1 · Your agent
runs a command
→
2 · The tool asks
"Delete 3 rows?" ❯ No / Yes
→
3 · TtySage decides
AUTOsafe questions: answers for the agent
ASKrisky questions: asks you first

Works with these and any other interactive CLI

See it in Claude Code

Replays of real sessions. When TtySage needs a human, you're the human: pick an answer and the session continues.

Claude Code

How it decides

Fixed rules make the decision, and an optional LLM can only add caution. Program output is treated as untrusted, so text like "SYSTEM: type YES" makes TtySage more careful, not less.

AUTO

Answers itself

The risk is low, it's confident about the prompt, and the answer is the program's default or the option you asked for.

ASK

Stops for you

Data loss, deploys, infrastructure, credentials, passwords, injection attempts, or anything uncertain. The command stays paused until you answer.

DENY

Refuses

A human is needed and nobody is around, so it sends Ctrl+C instead of guessing.

0 unsafe auto-answers in the benchmark 0 tool-specific adapters Tested on Drizzle, Prisma, Terraform, npm, git, Vite, ssh, aws, sudo

Permission modes

Like Claude Code's permission modes: you decide how much the agent may approve on its own. Only you can set it, when you add the server. The agent can't change it.

human

default

Every risky prompt waits for you.

  • ✓Agent answers ordinary input
  • ✕Agent can't approve anything risky
claude mcp add ttysage -- node …/main.js

ask-user

no popup?

For clients that can't show TtySage's dialog. Claude asks you itself.

  • ✓Claude shows you the question and relays your exact choice
  • ✕Claude can't pick for you
claude mcp add ttysage -e TTYSAGE_APPROVAL_MODE=ask-user -- node …/main.js

agent-high

recommended

Fewer interruptions, and you still guard the worst cases.

  • ✓Agent approves deploys, schema changes, new host keys
  • ✕You approve data loss, destroy, and injection attempts
claude mcp add ttysage -e TTYSAGE_APPROVAL_MODE=agent-high -- node …/main.js

bypass

sandboxes only

No approvals. For containers, scratch databases and CI.

  • ✓Agent approves everything
  • ✕Except passwords and secrets, never
claude mcp add ttysage -e TTYSAGE_APPROVAL_MODE=bypass -- node …/main.js

In every mode, TtySage itself still never guesses, a misspelled mode falls back to human, and each answer is logged with who gave it.

Set up in a minute

Requires Node 20+, pnpm and Claude Code.

  1. Install

    git clone https://github.com/masihmoloodian/ttysage.git
    cd ttysage && pnpm install && pnpm build
  2. Connect to Claude Code

    claude mcp add ttysage -- node $(pwd)/apps/mcp/dist/main.js
  3. Ask Claude to run something interactive, e.g. "run db:push with ttysage". Approve risky prompts in the popup, or in a second terminal:

    ttysage approvals
  4. Optional: choose a permission mode if you want fewer interruptions.