watch -n 60 'claude -p "Check logs for errors: $(tail -20 app.log)"'

Category: AI Agents & MCP

watch -n 60 'claude -p "Check logs for errors: $(tail -20 app.log)"'

Run an AI log monitor every 60 seconds

watch re-runs a command at an interval. Combined with a CLI agent, you create a simple AI-powered monitoring loop. The agent checks recent log lines and prints analysis. For production use, pipe the output to a notification system.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.