From ask-tty
When stdin input is needed (sudo, ssh, y/N confirmations, etc.), use InteractiveBash or ask-tty. Always active.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ask-tty:ask-ttyThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
The built-in Bash tool does not support stdin. Two tools solve this:
The built-in Bash tool does not support stdin. Two tools solve this:
Use when you already have the stdin content (e.g., piping "y" to a prompt, feeding a heredoc).
InteractiveBash(command: "apt install -y nginx", stdin: "y\n")
InteractiveBash(command: "cat > /tmp/config.json", stdin: '{"key":"value"}')
Use when you need input from the user (passwords, confirmations you can't decide).
run_in_background: trueres:<their input>res: message, immediately use TaskOutput to check the background taskecho $(~/bin/ask-tty "sudo password" --sensitive) | sudo -S <command>
Then tell the user: "Type res:yourpassword"
sshpass -p "$(~/bin/ask-tty "SSH password for user@host" --sensitive)" ssh user@host <command>
ANSWER=$(~/bin/ask-tty "Proceed? (y/N)")
echo "$ANSWER" | <command>
Then tell the user: "Type res:y or res:n"
| Scenario | Tool |
|---|---|
| You know the input (y/n, config, heredoc) | InteractiveBash |
| User must provide input (password, decision) | ask-tty |
| sudo with password | ask-tty (password stays hidden) |
| sudo with NOPASSWD | regular Bash tool |
The hook has delivered the input to the background ask-tty process. Immediately:
res: / tty:run_in_background: true for Bash tool calls containing ask-tty--sensitive for passwords~/bin/ask-ttyres: / tty:~/.cache/ask-tty/response directlynpx claudepluginhub miyago9267/ask-tty --plugin ask-ttyRuns interactive CLI tools (vim, git rebase -i, REPLs) via tmux detached sessions with send-keys and capture-pane for programmatic control when standard bash piping fails.
Provides Claude Code bash patterns for PreToolUse hooks, command chaining, CLI orchestration, git workflows, custom commands, and handling bash permissions, failures, security guards.
Automates interactive terminal programs (REPLs, debuggers, TUIs) via PTY. Start sessions, type text/keystrokes, wait for screen stability, snapshot output, and manage multiple sessions.