Claude Code integrates into shell scripts. The -p flag runs a one-shot command without starting an interactive session.
Monitor logs in real time: tail -f app.log | claude -p "Alert me if you see errors"
Review code in CI: claude -p "Review this diff for issues" < diff.txt
Automate translation: claude -p "Translate new strings to French" | gh pr create
Pipe any input to Claude. Chain outputs with other Unix tools like gh, jq, or awk. This makes Claude Code a building block for automation workflows.