Claude Code · Sessions and flags

Run one prompt and exit

Print mode runs the prompt, prints the answer and exits, which suits scripts.

claude -p "summarize this repository"

Official Claude Code documentation

More sessions and flags commands

All sessions and flags commands · Claude Code cheatsheet

Was this page helpful?