stdin, stdout, and stderr

Behave like a Unix tool

A good CLI assistant follows three Unix channels. Standard input (stdin) carries data into it. Standard output (stdout) carries its main result. Standard error (stderr) carries warnings and diagnostics. Its numeric exit code says success or failure. These rules let it connect cleanly to git diff, find, jq, pipes, and file redirection.

Example: git diff --cached | ai-summarize > commit-message.txt. The program should reject an empty or oversized stream and avoid interactive prompts when input is piped.

Tip: Keep stdout machine-clean. A decorative progress message mixed into JSON can break every downstream command.