I built `ask`, a small CLI for piping shell output into Claude
I kept copying terminal output into a chat window, so I wrote a small Go CLI that lets me pipe it instead. git diff | ask "write a commit message" npm test 2>&1 | ask "why does this fail?" ask -f main.go "explain this file" --format markdown ask "bash script that lists large files" --code -o big.sh ask "list 3 colors as a JSON array" --code | jq . Features Made for pipes: the answer streams to stdout, while the spinner, stats and notices go to stderr. Output formats: plain text, styled Markdown or JSON, and --schema makes the answer follow a JSON schema. Code only: --code prints just the code blocks, ready to pipe or save. Context: add files with -f , or pipe in any command's output. Conversations: continue the last one with -c , or go back to an older one with --resume . Personas: save reusable system prompts and use them with --as reviewer . Spending limit: cap a run with --budget 0.50 , though it can endslightly over because the limit is checked between steps. Local history: browse past answers with ask history , or skip saving with --no-history . Extras: --copy for the clipboard, --stats for cost and duration, and shell completion for PowerShell, bash, zsh and fish. Tools are off by default Piped text can contain instructions, so curl ... | ask "summarize" can't run commands, read or edit files, or use your MCP servers. Claude only sees what you give it. Pass --tools when you want it to act in the current folder, following your Claude Code permission settings. Install Linux and macOS: curl -fsSL raw.githubusercontent.com/OrionWambert/ask-golang/main/scripts/get.sh | sh Windows (PowerShell): irm raw.githubusercontent.com/OrionWambert/ask-golang/main/scripts/get.ps1 | iex The scripts download the latest release and verify its checksum. You can also read them first, or grab an archive from the releases page. Requirements ask is a wrapper around the Claude Code CLI rather than a direct API client, so you need claude installed and logged in. It uses your existing login and settings, and you don't need an API key in ask . Links It's MIT licensed, and runs on Linux, macOS and Windows. github.com/OrionWambert/ask-golang This is the first release, so I'd welcome feedback, especially on what's missing or annoying.