Skip to content
BoldCreate

Print mode and automation

Run one-off requests, pipe input, produce JSON output, and use BoldCreate CLI in scripts and CI.

What you’ll learn

  • How to get a single answer without opening the chat
  • How to send input from a file or another command
  • How to get machine-readable JSON output
  • How approvals work when nobody is watching
  • How to sign in from scripts and automated builds
  • What each exit code means

What print mode is

In print mode, BoldCreate runs your request once, prints the final answer, and exits. It is useful for quick questions and scripts.

BoldCreate uses print mode when you pass -p (--print), --mode, or --json, or when input or output is not a terminal, such as when you pipe text into it.

boldcreate -p [PROMPT...] [@file...] [options]
Argument or optionWhat it does
PROMPTYour request. Put it in quotes if it has spaces.
-Read the request from standard input (a pipe).
@fileAttach a text file (up to 256 KB) or an image.
--mode text|jsonChoose output format. Text is the default.
--jsonSame as --mode json.
-y, --yesRun every action without asking (auto mode).
--approve-tools LISTTools that never need approval, separated by commas.
-c, --session IDContinue a session instead of starting one.
--no-sessionDon’t save the conversation.
--verboseAlso print each tool call on the error stream.

Other chat options, such as --model, --thinking, --agent, and --cwd, also work.

Examples

boldcreate -p "summarize README.md"
boldcreate -p "what is wrong in this screenshot?" @shot.png
boldcreate -p "review this file for bugs" @src/app.ts
boldcreate -p "fix the failing test" --yes
boldcreate -c -p "now update the changelog"

In text mode, only the final answer goes to standard output. BoldCreate prints a continuation command to the error stream:

continue: boldcreate -c, or boldcreate --session <session id>

Redirect output to save just the answer:

boldcreate -p "write release notes" > notes.md

Send input from a file or command

Use - to read a request from a pipe:

macOS:

echo "what is 2+2?" | boldcreate -p -
cat error.log | boldcreate -p "explain this error"

Windows (PowerShell):

"what is 2+2?" | boldcreate -p -
Get-Content error.log | boldcreate -p "explain this error"

When you pipe text and provide a prompt, the piped text comes first, followed by your prompt. Images named in piped text are not attached; pass them as @image.png arguments. ! commands don’t work in print mode.

JSON output

boldcreate -p "list the files" --json

BoldCreate prints one JSON object per line to standard output. Each object is an event, such as assistant text, a tool call, or an error. Human-readable messages go to the error stream, keeping standard output valid JSON lines.

Other commands also accept --json, including boldcreate sessions --json, boldcreate --list-models --json, and boldcreate mcp list --json.

Note: --json conflicts with --mode text.

Approvals in print mode

Nobody can answer an approval prompt in print mode, so BoldCreate decides based on your setup:

Your setupWhat happens
Default auto modeEvery action runs.
--yesEvery action runs, even if your settings say "approvalMode": "manual".
"approvalMode": "manual" in settingsActions that need approval stop unless the tool is in --approve-tools or autoApproveTools.

When a run stops for approval, BoldCreate exits with code 3 and tells you how to continue:

The run is waiting for approval of edit_file. Approve and continue with:
  boldcreate -p --session <session id> --approve-tools edit_file   (or --yes)

Use the narrowest approvals needed. For approval options, see Approvals and safety.

Sign in from scripts and CI

In automated builds, use environment variables rather than browser sign-in. Environment variables take priority over saved sign-in.

VariableWhat it holds
BOLDCREATE_CLIENT_IDOrganization API key client ID (starts with key_). Use with BOLDCREATE_CLIENT_SECRET.
BOLDCREATE_CLIENT_SECRETOrganization API key secret.
BOLDCREATE_TOKENSign-in token, as an alternative to an API key.

Example:

export BOLDCREATE_CLIENT_ID="key_..."
export BOLDCREATE_CLIENT_SECRET="..."
boldcreate -p "check the changelog for typos" --model <MODEL_ID>

Store secrets in your CI system’s secret storage, never in scripts or your repository. With an API key, the model list is unavailable, so pass --model or set BOLDCREATE_MODEL.

Exit codes

CodeMeaning
0Success
1The run failed
2Wrong command or options, or not signed in
3Stopped waiting for approval
130Cancelled

In a shell, check the last exit code with echo $? (macOS) or $LASTEXITCODE (PowerShell).

Common mistakes

MistakeMessage or fix
No prompt and nothing pipedboldcreate: nothing to do: pass a prompt (or pipe one in)
Not signed inRun boldcreate login.
Attaching a file over 256 KBReference it by path instead.
Attaching a binary file as textOnly text files can be attached with @file.
Using -r in print modeUse --session ID; --resume opens an interactive picker.