You can plug Claude Code into any shell script. 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 releases: claude -p "Translate new strings to French" | gh pr create
Pipe any input to Claude and chain outputs with Unix tools like gh, jq, or awk. This turns Claude Code into a composable building block for your automation pipeline.