The interface answers on its own and the final answer goes to standard output.
zerochat --prompt "TEXT" (or python3 zerochat.py --prompt "TEXT") starts the local server and, by default, opens the interface without a window in Playwright's Chromium using the local profile stored on the server (or the one you pass with --profile). When it finishes, it returns the answer and the process exits.
With --conversation ID you can continue a conversation already stored on the local server (either adding a new --prompt or resuming its last pending message), or turn on the Run on server switch in the chat header so turns run in the background even if you close the tab.
zerochat --prompt "Summarize today's changes in this repository" > summary.txt--log on it also goes to standard error.--browser it uses your default browser (visible, or windowless if you add --headless).| Option | Effect |
|---|---|
--conversation ID | Continues the conversation with that ID stored on the local server (see --list-conversations). Can be combined with --prompt TEXT to append a new user turn or used on its own to resume the last pending message or answer. |
--profile NAME | Uses that profile (name or id) for this run only, without changing the saved active profile. If omitted, uses the conversation's original profile (if present) or the server's local profile; if it does not exist, the run ends with an error. |
--browser | Opens the user's default browser in visible mode instead of Playwright's windowless Chromium. |
--headless | With --browser, opens the user's default browser without a window. See section 5. |
--export FILE | Saves the conversation to FILE; the format comes from the extension: .md (Markdown), .json (session) or .html (as shown in the chat). It is also exported after a generation error. |
--keep-page | With --browser (without --headless), does not close the page when it finishes, so you can see the conversation. The process exits anyway and the page is left disconnected from the server. |
--allow-dangerous-tools | Also approves the tools that write or execute. See section 3. |
--log on|off | Shows the startup banner and the server log on standard error. Defaults to off with --prompt. |
--port PORT | Listening port; if it is in use, the run does not start. Without --port, if another open ZeroChat uses the default port, the run listens on a free port and coexists with it (in development, with --browser and the local interface, it does not start). |
--prompt is not combined with --no-browser or --keep-server, because the run needs the browser and ends when it returns the result.
--prompt (without --conversation): every read tool that asks for permission is allowed for that page's session; write_file, edit_file and run_command are denied unless you pass --allow-dangerous-tools. If the model asks with ask_user, the run ends with an error (exit code 1, The run needs the user).--conversation: when a run with --conversation needs tool confirmation or an ask_user answer, it saves the conversation in SQLite with the pending card, prints a JSON object on standard output with {"status": "needs_input", "conversation_id": "...", "pending": {...}} and exits with code 0 so you can reply from the web interface or in a follow-up call.~/zerochat/runs/): the sidebar marks the conversation with a clock while running and with ? when waiting for your reply or permission; opening it shows live progress and lets you stop it at any time or approve the tool / answer ask_user to resume.--profile it starts the ones the profile ticks in its MCP servers chapter, and Playwright MCP if it is the browsing tool or the profile requires it, with the profile’s browser; if one is not configured or does not start, the run ends with an error. Without --profile none is started. All of them stop when the run ends and leave no trace for the next session.The run is cut off after 15 minutes, or after 3 minutes without progress from the interface (each step, tool or answer fragment counts as progress).
| Code | Meaning |
|---|---|
0 | Finished: the answer is on standard output (or the needs_input JSON if --conversation paused waiting for permission or a reply). |
1 | Generation error, unknown profile, unavailable profile MCP service, request to the user, or a requested export that could not be written (in that last case the answer is still printed). |
2 | Time limit reached, or the browser closed without returning a result. |
3 | Startup failure: port in use or browser that could not be opened. |
4 | Invalid arguments (also outside --prompt). |
--browser / --headless)By default, --prompt runs without a window using the Chromium installed in Playwright's cache and the profiles stored on the local server (~/zerochat/storage/zerochat.db), without needing a graphical session or requiring your browser to be closed.
--prompt --browser: opens your default browser in visible mode (with your local profiles, history and rules saved in it). Supports --keep-page.--prompt --browser --headless: on Linux, looks up the default browser (xdg-settings) and launches it with --headless on your normal profile; if it is already open or cannot be identified, it opens as a tab the normal way.local, or the one passed in --profile) and install the Chromium engine in Settings › Browser. That way --prompt runs directly in the background without a graphical session or conflicts with your open browser.PATH in the home directory. Change to the working directory with cd and add to PATH the commands your MCP services need (node, npx, uvx…).MAILTO); the exit code tells each case apart. flock keeps two runs from overlapping.MAILTO=user
0 7 * * * cd "$HOME/project" && PATH="$HOME/.local/bin:/usr/local/bin:/usr/bin:/bin" flock -n /tmp/zerochat-prompt.lock zerochat --prompt "Prepare the daily report" --export "$HOME/reports/daily.html"Before scheduling a run, check that the machine has everything it uses:
--profile, with provider, URL, model and API key. A local model server (LM Studio, Ollama…) must be running.~/zerochat/services, with their dependencies installed, their credentials in their service.json and their commands (node, npx, uvx…) in the job's PATH. Those that ask for OAuth authorization must have completed it before in a windowed session.browser_action, Node.js with Playwright and a compatible browser (see model browser).--allow-dangerous-tools if the job writes files or runs commands, and the directory rules in Settings › Permissions it needs.