#scripting
1 articles
-
claude -p: run Claude Code non-interactively in scripts and CI (--output-format json, --allowedTools)
Use claude -p "prompt" for non-interactive mode: pipe stdin, get JSON with --output-format json, pre-approve tools with --allowedTools, cap cost with --max-turns. Works in cron/CI.