CLI commands and flags

--exec

Executes a shell command as a background PTY process instead of running Claude.

Syntax

--exec

Example

Terminal
claude --bg --exec 'pytest -x'

Type to search the reference, templates and lessons.