How do I run Line CLI in print mode for scripts?
line -p "explain what src/main.rs does"
Print mode runs one turn without the interactive view:
- The answer streams to stdout.
- Tool activity, retries and the usage line go to stderr.
- The run is saved as a session, so
line -c -p "continue"picks it up.
Approvals in print mode#
Nobody is there to approve, so anything that would ask is declined ("declined …: run with --yes (or --allowed-tools) to allow it in print mode"). Allow what the job needs with --allowed-tools, --permission-mode accept-edits, or --yes.
Print mode needs a prompt: "--print needs a prompt".
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyzFor deleting your whole account or the data of one service.