Skip to content
Source on GitHub (opens in a new tab)

Every command prints this for -h. Flags go before the task or the subcommand’s arguments. Saved settings stand in for flags you don’t give.

usage: zelk [flags] ["prompt"] open the terminal UI (-c continue, -r resume)
zelk -p [flags] "task" | < task run one task and print the answer
zelk exec [flags] "task" | zelk exec resume --last ["task"] | zelk exec review
zelk acp [flags]
zelk status [-state dir] [session]
zelk sessions [-state dir] list | report id | rename id title | tags id [tag ...] | delete id
zelk memory [flags] [list | show NAME | forget NAME | where]
zelk hooks [-state dir] list | trust
zelk project [-state dir] list | trust
zelk processes -process-socket PATH [flags] serve | list | input | output | stop
zelk browser [-state dir] setup | status | extension | pair | native-messaging
zelk sandbox [-state dir] setup | status
zelk mcp [-mcp-config FILE] list | login SERVER | logout SERVER
zelk providers login chatgpt [-another] | zelk providers logout chatgpt
zelk login [-another] | zelk logout: older names for the two above
zelk credentials [list] | move -to keychain|file [doc ...] | purge doc ...
zelk policy [-json]
Each subcommand takes -h for its own flags.
Flag Value Description
-allow value an allow rule, such as ‘Bash(npm test *)’ (repeatable)
-ask value an ask rule (repeatable)
-background string the terminal’s background, dark or light (default: ask the terminal) (terminal UI)
-base-url string the API’s base URL (default $OPENAI_BASE_URL, $ANTHROPIC_BASE_URL or $GEMINI_BASE_URL, or $OLLAMA_HOST, then the vendor’s or the local server’s default)
-bash string the bash to run commands with; on Windows the default is the bash.exe of Git for Windows, and a path here replaces it and, unless -powershell is given too, turns PowerShell off. MXC does not support -bash (default “/bin/bash”)
-browser give the agent a headless Chrome of its own (set it up with zelk browser setup), one per session; under -sandbox bwrap, seatbelt or mxc it runs in the sandbox with the commands’ network
-browser-local string ports on this machine’s loopback, as 3000,5173, that the sandboxed browser may reach though its network is off or allowlisted: a dev server’s (requires -browser and -sandbox bwrap or seatbelt)
-c continue this directory’s last session (terminal UI)
-cache string prompt caching for the openai-compat provider: on, off, or auto (on for Claude models, which cache only on request) (default “auto”)
-checkpoints keep checkpoints: the old version of each file the agent edits, so the rewind menu can restore code (new sessions) (default true)
-cleanup-days int remove sessions idle for longer than this many days, with their checkpoints, at least 1 (default 30)
-context-window int the context window, in tokens, of a model whose provider reports none, as OpenAI’s API and OpenCode don’t: with it sessions compact before a prompt is refused as too long (0: unknown)
-credential-store string where new credentials are kept: file, in zelk’s config directory, or keychain, the system’s (the Secret Service on Linux, the login keychain on macOS, the Credential Manager on Windows); credentials already kept stay where they are until zelk credentials move (default “file”)
-deferred-tool-tokens int MCP schema token estimate threshold for ToolSearch/CallTool (0: 10% of known context window)
-deny value a deny rule, such as ‘Bash(rm *)’ (repeatable)
-effort string reasoning effort: low, medium or high (default the model’s)
-env value a variable to pass to commands, besides the base set (repeatable)
-human value a rule only a human may approve, such as ‘Bash(git push *)’ (repeatable)
-input string how approvals and questions are answered: deny (no one is asked) or prompt (on this terminal, from standard input) (print mode) (default “deny”)
-json write the session’s events to standard output as JSON Lines (print mode)
-lsp check each file the agent edits with the language server for it found on PATH (gopls, typescript-language-server, basedpyright or pyright, rust-analyzer, clangd, lua-language-server, yaml-language-server), and tell it the errors (default true)
-max-turns int the most model turns a run may take (0: no limit) (default: none in the terminal UI, 250 in print mode)
-mcp-config string MCP server configuration JSON file (stdio and streamable HTTP)
-mode string the permission mode: plan (read-only), default, accept-edits, auto, dont-ask or bypass (runs everything no rule denies). An action the mode doesn’t allow is asked about, classified (auto) or denied (dont-ask, or when no one can be asked) (default: default in the terminal UI, bypass in print mode)
-model string the model to call (default “gpt-5”)
-models value another model Switch model… offers (repeatable) (terminal UI)
-network string network for sandboxed commands and, under a sandbox, the web tools and HTTP MCP servers: off, full or allowlist (default off under a sandbox)
-network-allow value allowed domain[:port] or *.domain[:port] for bwrap or mxc subprocesses (repeatable; selects allowlist)
-no-deferred-tools keep all MCP schemas directly visible
-no-memory run without cross-conversation memory (notes kept under the state directory’s memory/)
-no-powershell on Windows, run commands in Git Bash only, without the PowerShell tool. Unavailable with MXC
-no-reviewer-check rely on the auto-mode reviewer without checking its model first
-o string write the last message, or the structured result, to this file; a run that gave neither writes why it ended (print mode)
-opencode-plans string OpenCode plans: zen, go or both (use zen/<id> or go/<id> with both) (default “zen”)
-otel export traces and metrics over OTLP; the standard OTEL_EXPORTER_OTLP_* variables say where and how
-otel-capture value content -otel records on spans: prompts, tool-inputs, tool-outputs or provider-bodies (comma-separated or repeatable)
-output-schema string a JSON Schema file; the run delivers a value that fits it, written to standard output (print mode)
-p print mode: run the task, print the answer and exit (the mode when standard input or output isn’t a terminal)
-plan plan mode: run only read-only tools and present a plan (the same as -mode plan)
-powershell string on Windows, the PowerShell (pwsh.exe or powershell.exe) to run commands with, the agent’s primary shell; by default one is found, and the agent has Git Bash too when it is found outside MXC
-process-socket string private local process supervisor socket outside the workspace
-progress with -json, also write a {“live”:“progress”} record while a model call or tool streams, at most every 2s each (print mode)
-protect value an extra protected path pattern (repeatable)
-provider string the API: openai-compat (Chat Completions), openai (Responses), anthropic (Messages), gemini (Gemini API), opencode (Zen and Go), chatgpt (Responses on your ChatGPT plan; sign in with zelk login), or a server on this machine: ollama, lmstudio or llamacpp (default “openai-compat”)
-providers string the providers file Providers… keeps (default $XDG_CONFIG_HOME/zelk/providers.json, then ~/.config/zelk/providers.json) (terminal UI)
-r pick a session to resume (terminal UI)
-result string write the run’s result, with usage and report, to this file as JSON (print mode)
-reviewer-effort string the auto-mode reviewer’s reasoning effort: low, medium or high (default none: the model’s own)
-sandbox string the launcher that confines commands: none, bwrap (Linux), seatbelt (macOS) or mxc (Windows, set up with zelk sandbox setup). An unattended auto-mode run defaults to bwrap on Linux and uses mxc on Windows when set up (default “none”)
-sandbox-read-only value a host path bwrap shows sandboxed commands read-only, beside the toolchains it finds; ~/ for the home directory, whose credential files stay hidden (repeatable)
-scheduling offer user-authorized scheduling tools: one-shot and recurring messages into the conversation, while it is open
-search-model string model for native WebSearch (default: fast model for the provider family)
-session string open the session with this ID (terminal UI)
-settings string the settings file (default $XDG_CONFIG_HOME/zelk/tui.json, then ~/.config/zelk/tui.json) (terminal UI)
-skill-cache string publish recorded skill scripts in an existing private workspace-relative cache (requires bwrap, seatbelt or mxc)
-state string where sessions are kept (default $XDG_STATE_HOME/zelk, then ~/.local/state/zelk) (terminal UI)
-theme string a theme file (default $XDG_CONFIG_HOME/zelk/theme.json, then ~/.config/zelk/theme.json) (terminal UI)
-tool-loading string native loading of deferred tools for the openai and anthropic providers, on models that support it: on (at any base URL, such as a gateway that passes the fields through), off, or auto (only at the vendor’s own URL) (default “auto”)
-trust value something you count as your own environment, for the auto-mode reviewer, such as a repository, bucket or internal service; it authorizes no particular operation on it (repeatable)
-user-browser give the agent your own browser (Chrome, Brave or Edge), signed in as you, through zelk’s extension: it works only in tabs you share or it opens, acts without asking only in tabs you trusted, and never types passwords (set it up with zelk browser extension, then zelk browser pair, or pair in the terminal UI’s Settings)
-user-browser-pace string how input goes in your browser: person (a pointer that travels, keys a tenth of a second apart, pauses between actions, as yours would) or fast (at once) (default “person”)
-verify value a check the agent runs with Verify, as NAME=COMMAND, such as ‘test=go test ./…’: a run can’t end as a success while one has failed (repeatable)
-verify-timeout duration how long a Verify check may run, for projects whose checks take longer (0: ten minutes)
-version print the harness version and build commit, then exit
-worktree value work in the git worktree <repository>/.zelk/worktrees/<name> on branch worktree-<name>, made from HEAD if it doesn’t exist (-worktree= picks a name; ‘#<n>’ or a pull or merge request URL fetches that change from origin into pr-<n>) (terminal UI)
usage: zelk exec [flags] "task"
zelk exec review [flags] ["extra instructions"]
zelk exec [flags] resume --last ["task"]
zelk exec [flags] resume --last --compact ["what to keep"]
zelk exec [flags] resume --last --fork ["task"]
Piped standard input is passed as context, or is the task if none is given.
Flag Value Description
-allow value an allow rule, such as ‘Bash(npm test *)’ (repeatable)
-ask value an ask rule (repeatable)
-base-url string the API’s base URL (default $OPENAI_BASE_URL, $ANTHROPIC_BASE_URL or $GEMINI_BASE_URL, or $OLLAMA_HOST, then the vendor’s or the local server’s default)
-bash string the bash to run commands with; on Windows the default is the bash.exe of Git for Windows, and a path here replaces it and, unless -powershell is given too, turns PowerShell off. MXC does not support -bash (default “/bin/bash”)
-browser give the agent a headless Chrome of its own (set it up with zelk browser setup), one per session; under -sandbox bwrap, seatbelt or mxc it runs in the sandbox with the commands’ network
-browser-local string ports on this machine’s loopback, as 3000,5173, that the sandboxed browser may reach though its network is off or allowlisted: a dev server’s (requires -browser and -sandbox bwrap or seatbelt)
-cache string prompt caching for the openai-compat provider: on, off, or auto (on for Claude models, which cache only on request) (default “auto”)
-checkpoints keep checkpoints: the old version of each file the agent edits, so the rewind menu can restore code (new sessions) (default true)
-cleanup-days int remove sessions idle for longer than this many days, with their checkpoints, at least 1 (default 30)
-context-window int the context window, in tokens, of a model whose provider reports none, as OpenAI’s API and OpenCode don’t: with it sessions compact before a prompt is refused as too long (0: unknown)
-credential-store string where new credentials are kept: file, in zelk’s config directory, or keychain, the system’s (the Secret Service on Linux, the login keychain on macOS, the Credential Manager on Windows); credentials already kept stay where they are until zelk credentials move (default “file”)
-deferred-tool-tokens int MCP schema token estimate threshold for ToolSearch/CallTool (0: 10% of known context window)
-deny value a deny rule, such as ‘Bash(rm *)’ (repeatable)
-effort string reasoning effort: low, medium or high (default the model’s)
-env value a variable to pass to commands, besides the base set (repeatable)
-human value a rule only a human may approve, such as ‘Bash(git push *)’ (repeatable)
-input string how approvals and questions are answered: deny (no one is asked) or prompt (on this terminal, from standard input) (default “deny”)
-json write the session’s events to standard output as JSON Lines
-lsp check each file the agent edits with the language server for it found on PATH (gopls, typescript-language-server, basedpyright or pyright, rust-analyzer, clangd, lua-language-server, yaml-language-server), and tell it the errors (default true)
-max-turns int the most model turns a run may take (0: no limit) (default 250)
-mcp-config string MCP server configuration JSON file (stdio and streamable HTTP)
-mode string the permission mode: plan (read-only), default, accept-edits, auto, dont-ask or bypass (runs everything no rule denies). An action the mode doesn’t allow is asked about, classified (auto) or denied (dont-ask, or when no one can be asked) (default “plan”)
-model string the model to call (default “gpt-5”)
-network string network for sandboxed commands and, under a sandbox, the web tools and HTTP MCP servers: off, full or allowlist (default off under a sandbox)
-network-allow value allowed domain[:port] or *.domain[:port] for bwrap or mxc subprocesses (repeatable; selects allowlist)
-no-deferred-tools keep all MCP schemas directly visible
-no-memory run without cross-conversation memory (notes kept under the state directory’s memory/)
-no-powershell on Windows, run commands in Git Bash only, without the PowerShell tool. Unavailable with MXC
-no-reviewer-check rely on the auto-mode reviewer without checking its model first
-o string write the last message, or the structured result, to this file; a run that gave neither writes why it ended
-opencode-plans string OpenCode plans: zen, go or both (use zen/<id> or go/<id> with both) (default “zen”)
-otel export traces and metrics over OTLP; the standard OTEL_EXPORTER_OTLP_* variables say where and how
-otel-capture value content -otel records on spans: prompts, tool-inputs, tool-outputs or provider-bodies (comma-separated or repeatable)
-output-schema string a JSON Schema file; the run delivers a value that fits it, written to standard output
-plan plan mode: run only read-only tools and present a plan (the same as -mode plan)
-powershell string on Windows, the PowerShell (pwsh.exe or powershell.exe) to run commands with, the agent’s primary shell; by default one is found, and the agent has Git Bash too when it is found outside MXC
-process-socket string private local process supervisor socket outside the workspace
-progress with -json, also write a {“live”:“progress”} record while a model call or tool streams, at most every 2s each
-protect value an extra protected path pattern (repeatable)
-provider string the API: openai-compat (Chat Completions), openai (Responses), anthropic (Messages), gemini (Gemini API), opencode (Zen and Go), chatgpt (Responses on your ChatGPT plan; sign in with zelk login), or a server on this machine: ollama, lmstudio or llamacpp (default “openai-compat”)
-result string write the run’s result, with usage and report, to this file as JSON
-retry-denied string request one further classification of this denied action digest when resuming; still subject to current policy
-reviewer-effort string the auto-mode reviewer’s reasoning effort: low, medium or high (default none: the model’s own)
-sandbox string the launcher that confines commands: none, bwrap (Linux), seatbelt (macOS) or mxc (Windows, set up with zelk sandbox setup). An unattended auto-mode run defaults to bwrap on Linux and uses mxc on Windows when set up (default “none”)
-sandbox-read-only value a host path bwrap shows sandboxed commands read-only, beside the toolchains it finds; ~/ for the home directory, whose credential files stay hidden (repeatable)
-scheduling offer user-authorized scheduling tools: one-shot and recurring messages into the conversation, while it is open
-search-model string model for native WebSearch (default: fast model for the provider family)
-skill-cache string publish recorded skill scripts in an existing private workspace-relative cache (requires bwrap, seatbelt or mxc)
-state string where sessions and the last-session pointer are kept (default $XDG_STATE_HOME/zelk, then ~/.local/state/zelk, or on Windows %LOCALAPPDATA%\zelk)
-tool-loading string native loading of deferred tools for the openai and anthropic providers, on models that support it: on (at any base URL, such as a gateway that passes the fields through), off, or auto (only at the vendor’s own URL) (default “auto”)
-trust value something you count as your own environment, for the auto-mode reviewer, such as a repository, bucket or internal service; it authorizes no particular operation on it (repeatable)
-user-browser give the agent your own browser (Chrome, Brave or Edge), signed in as you, through zelk’s extension: it works only in tabs you share or it opens, acts without asking only in tabs you trusted, and never types passwords (set it up with zelk browser extension, then zelk browser pair, or pair in the terminal UI’s Settings)
-user-browser-pace string how input goes in your browser: person (a pointer that travels, keys a tenth of a second apart, pauses between actions, as yours would) or fast (at once) (default “person”)
-verify value a check the agent runs with Verify, as NAME=COMMAND, such as ‘test=go test ./…’: a run can’t end as a success while one has failed (repeatable)
-verify-timeout duration how long a Verify check may run, for projects whose checks take longer (0: ten minutes)
-version print the harness version and build commit, then exit
-worktree value work in the git worktree <repository>/.zelk/worktrees/<name> on branch worktree-<name>, made from HEAD if it doesn’t exist (-worktree= picks a name; ‘#<n>’ or a pull or merge request URL fetches that change from origin into pr-<n>)
usage: zelk acp [flags]
Flag Value Description
-allow value an allow rule, such as ‘Bash(npm test *)’ (repeatable)
-ask value an ask rule (repeatable)
-base-url string the API’s base URL (default $OPENAI_BASE_URL, $ANTHROPIC_BASE_URL or $GEMINI_BASE_URL, or $OLLAMA_HOST, then the vendor’s or the local server’s default)
-bash string the bash to run commands with; on Windows the default is the bash.exe of Git for Windows, and a path here replaces it and, unless -powershell is given too, turns PowerShell off. MXC does not support -bash (default “/bin/bash”)
-browser give the agent a headless Chrome of its own (set it up with zelk browser setup), one per session; under -sandbox bwrap, seatbelt or mxc it runs in the sandbox with the commands’ network
-browser-local string ports on this machine’s loopback, as 3000,5173, that the sandboxed browser may reach though its network is off or allowlisted: a dev server’s (requires -browser and -sandbox bwrap or seatbelt)
-cache string prompt caching for the openai-compat provider: on, off, or auto (on for Claude models, which cache only on request) (default “auto”)
-checkpoints keep checkpoints: the old version of each file the agent edits, so the rewind menu can restore code (new sessions) (default true)
-cleanup-days int remove sessions idle for longer than this many days, with their checkpoints, at least 1 (default 30)
-client-fs read and write files through the client when it offers to, so an editor shows its buffers and the agent’s edits
-client-terminal run commands in the client’s terminals when it offers them; they run outside the sandbox
-connect string relay standard input and output to a zelk acp serving on unix:PATH, instead of serving
-context-window int the context window, in tokens, of a model whose provider reports none, as OpenAI’s API and OpenCode don’t: with it sessions compact before a prompt is refused as too long (0: unknown)
-credential-store string where new credentials are kept: file, in zelk’s config directory, or keychain, the system’s (the Secret Service on Linux, the login keychain on macOS, the Credential Manager on Windows); credentials already kept stay where they are until zelk credentials move (default “file”)
-deferred-tool-tokens int MCP schema token estimate threshold for ToolSearch/CallTool (0: 10% of known context window)
-deny value a deny rule, such as ‘Bash(rm *)’ (repeatable)
-effort string reasoning effort: low, medium or high (default the model’s)
-env value a variable to pass to commands, besides the base set (repeatable)
-human value a rule only a human may approve, such as ‘Bash(git push *)’ (repeatable)
-listen string serve many clients until stopped, on unix:PATH (a socket only you may use) or ws://127.0.0.1:PORT (a WebSocket that needs the token)
-lsp check each file the agent edits with the language server for it found on PATH (gopls, typescript-language-server, basedpyright or pyright, rust-analyzer, clangd, lua-language-server, yaml-language-server), and tell it the errors (default true)
-max-turns int the most model turns a run may take (0: no limit) (default 250)
-mcp-config string MCP server configuration JSON file (stdio and streamable HTTP)
-mode string the permission mode: plan (read-only), default, accept-edits, auto, dont-ask or bypass (runs everything no rule denies). An action the mode doesn’t allow is asked about, classified (auto) or denied (dont-ask, or when no one can be asked) (default “default”)
-model string the model to call (default “gpt-5”)
-models value another model clients may switch to (repeatable)
-network string network for sandboxed commands and, under a sandbox, the web tools and HTTP MCP servers: off, full or allowlist (default off under a sandbox)
-network-allow value allowed domain[:port] or *.domain[:port] for bwrap or mxc subprocesses (repeatable; selects allowlist)
-no-deferred-tools keep all MCP schemas directly visible
-no-memory run without cross-conversation memory (notes kept under the state directory’s memory/)
-no-powershell on Windows, run commands in Git Bash only, without the PowerShell tool. Unavailable with MXC
-no-reviewer-check rely on the auto-mode reviewer without checking its model first
-opencode-plans string OpenCode plans: zen, go or both (use zen/<id> or go/<id> with both) (default “zen”)
-otel export traces and metrics over OTLP; the standard OTEL_EXPORTER_OTLP_* variables say where and how
-otel-capture value content -otel records on spans: prompts, tool-inputs, tool-outputs or provider-bodies (comma-separated or repeatable)
-plan plan mode: run only read-only tools and present a plan (the same as -mode plan)
-powershell string on Windows, the PowerShell (pwsh.exe or powershell.exe) to run commands with, the agent’s primary shell; by default one is found, and the agent has Git Bash too when it is found outside MXC
-process-socket string private local process supervisor socket outside the workspace
-protect value an extra protected path pattern (repeatable)
-provider string the API: openai-compat (Chat Completions), openai (Responses), anthropic (Messages), gemini (Gemini API), opencode (Zen and Go), chatgpt (Responses on your ChatGPT plan; sign in with zelk login), or a server on this machine: ollama, lmstudio or llamacpp (default “openai-compat”)
-reviewer-effort string the auto-mode reviewer’s reasoning effort: low, medium or high (default none: the model’s own)
-sandbox string the launcher that confines commands: none, bwrap (Linux), seatbelt (macOS) or mxc (Windows, set up with zelk sandbox setup). An unattended auto-mode run defaults to bwrap on Linux and uses mxc on Windows when set up (default “none”)
-sandbox-read-only value a host path bwrap shows sandboxed commands read-only, beside the toolchains it finds; ~/ for the home directory, whose credential files stay hidden (repeatable)
-scheduling offer user-authorized scheduling tools: one-shot and recurring messages into the conversation, while it is open
-search-model string model for native WebSearch (default: fast model for the provider family)
-skill-cache string publish recorded skill scripts in an existing private workspace-relative cache (requires bwrap, seatbelt or mxc)
-state string where sessions are kept (default $XDG_STATE_HOME/zelk, then ~/.local/state/zelk, or on Windows %LOCALAPPDATA%\zelk)
-token-file string with -listen ws://…: the file holding the token clients send as “Authorization: Bearer TOKEN”, made if missing (default acp-token in the state directory)
-tool-loading string native loading of deferred tools for the openai and anthropic providers, on models that support it: on (at any base URL, such as a gateway that passes the fields through), off, or auto (only at the vendor’s own URL) (default “auto”)
-trust value something you count as your own environment, for the auto-mode reviewer, such as a repository, bucket or internal service; it authorizes no particular operation on it (repeatable)
-user-browser give the agent your own browser (Chrome, Brave or Edge), signed in as you, through zelk’s extension: it works only in tabs you share or it opens, acts without asking only in tabs you trusted, and never types passwords (set it up with zelk browser extension, then zelk browser pair, or pair in the terminal UI’s Settings)
-user-browser-pace string how input goes in your browser: person (a pointer that travels, keys a tenth of a second apart, pauses between actions, as yours would) or fast (at once) (default “person”)
-verify value a check the agent runs with Verify, as NAME=COMMAND, such as ‘test=go test ./…’: a run can’t end as a success while one has failed (repeatable)
-verify-timeout duration how long a Verify check may run, for projects whose checks take longer (0: ten minutes)
usage: zelk status [-state dir] [-provider name] [-base-url url] [-opencode-plans plans] [session]
Shows a session's model, state, tasks and background jobs; by default the last session in this directory.
Flag Value Description
-base-url string billing endpoint (default provider environment, then vendor)
-opencode-plans string OpenCode plans for cost: zen, go or both (default “both”)
-provider string billing route for cost: openai, anthropic, gemini, opencode, chatgpt, openai-compat, ollama, lmstudio or llamacpp (default tokens only)
-state string session state directory (default “/home/you/.local/state/zelk”)
Flag Value Description
-force remove an unreadable session tree without busy or publication checks (delete only)
-skill-cache string release recorded publications from this workspace-relative cache before deletion
-state string session state directory (default “/home/you/.local/state/zelk”)
-tag string list sessions carrying this tag
usage: zelk memory [flags] [list | show NAME | forget NAME | where]
Flag Value Description
-dir string the workspace whose project notes to manage (default “/home/you/project”)
-state string session state directory (default “/home/you/.local/state/zelk”)
-user show and forget the user’s notes, for every project, rather than the project’s
Flag Value Description
-state string state directory for hook trust (default “/home/you/.local/state/zelk”)
Flag Value Description
-state string state directory for project trust (default “/home/you/.local/state/zelk”)
usage: zelk processes -process-socket /private/path/jobs.sock [flags] serve | list | input text | output | stop
Run serve in an independent terminal or under a service manager.
Flag Value Description
-allow value an allow rule, such as ‘Bash(npm test *)’ (repeatable)
-ask value an ask rule (repeatable)
-base-url string the API’s base URL (default $OPENAI_BASE_URL, $ANTHROPIC_BASE_URL or $GEMINI_BASE_URL, or $OLLAMA_HOST, then the vendor’s or the local server’s default)
-bash string the bash to run commands with; on Windows the default is the bash.exe of Git for Windows, and a path here replaces it and, unless -powershell is given too, turns PowerShell off. MXC does not support -bash (default “/bin/bash”)
-browser give the agent a headless Chrome of its own (set it up with zelk browser setup), one per session; under -sandbox bwrap, seatbelt or mxc it runs in the sandbox with the commands’ network
-browser-local string ports on this machine’s loopback, as 3000,5173, that the sandboxed browser may reach though its network is off or allowlisted: a dev server’s (requires -browser and -sandbox bwrap or seatbelt)
-cache string prompt caching for the openai-compat provider: on, off, or auto (on for Claude models, which cache only on request) (default “auto”)
-checkpoints keep checkpoints: the old version of each file the agent edits, so the rewind menu can restore code (new sessions) (default true)
-cleanup-days int remove sessions idle for longer than this many days, with their checkpoints, at least 1 (default 30)
-context-window int the context window, in tokens, of a model whose provider reports none, as OpenAI’s API and OpenCode don’t: with it sessions compact before a prompt is refused as too long (0: unknown)
-credential-store string where new credentials are kept: file, in zelk’s config directory, or keychain, the system’s (the Secret Service on Linux, the login keychain on macOS, the Credential Manager on Windows); credentials already kept stay where they are until zelk credentials move (default “file”)
-cursor int output cursor (reading does not consume another client’s cursor)
-deferred-tool-tokens int MCP schema token estimate threshold for ToolSearch/CallTool (0: 10% of known context window)
-deny value a deny rule, such as ‘Bash(rm *)’ (repeatable)
-effort string reasoning effort: low, medium or high (default the model’s)
-env value a variable to pass to commands, besides the base set (repeatable)
-human value a rule only a human may approve, such as ‘Bash(git push *)’ (repeatable)
-id string supervisor process ID for input, output or stop
-lsp check each file the agent edits with the language server for it found on PATH (gopls, typescript-language-server, basedpyright or pyright, rust-analyzer, clangd, lua-language-server, yaml-language-server), and tell it the errors (default true)
-max-turns int the most model turns a run may take (0: no limit) (default 250)
-mcp-config string MCP server configuration JSON file (stdio and streamable HTTP)
-mode string the permission mode: plan (read-only), default, accept-edits, auto, dont-ask or bypass (runs everything no rule denies). An action the mode doesn’t allow is asked about, classified (auto) or denied (dont-ask, or when no one can be asked) (default “plan”)
-model string the model to call (default “gpt-5”)
-network string network for sandboxed commands and, under a sandbox, the web tools and HTTP MCP servers: off, full or allowlist (default off under a sandbox)
-network-allow value allowed domain[:port] or *.domain[:port] for bwrap or mxc subprocesses (repeatable; selects allowlist)
-no-deferred-tools keep all MCP schemas directly visible
-no-memory run without cross-conversation memory (notes kept under the state directory’s memory/)
-no-powershell on Windows, run commands in Git Bash only, without the PowerShell tool. Unavailable with MXC
-no-reviewer-check rely on the auto-mode reviewer without checking its model first
-opencode-plans string OpenCode plans: zen, go or both (use zen/<id> or go/<id> with both) (default “zen”)
-otel export traces and metrics over OTLP; the standard OTEL_EXPORTER_OTLP_* variables say where and how
-otel-capture value content -otel records on spans: prompts, tool-inputs, tool-outputs or provider-bodies (comma-separated or repeatable)
-plan plan mode: run only read-only tools and present a plan (the same as -mode plan)
-powershell string on Windows, the PowerShell (pwsh.exe or powershell.exe) to run commands with, the agent’s primary shell; by default one is found, and the agent has Git Bash too when it is found outside MXC
-process-socket string private local process supervisor socket outside the workspace
-protect value an extra protected path pattern (repeatable)
-provider string the API: openai-compat (Chat Completions), openai (Responses), anthropic (Messages), gemini (Gemini API), opencode (Zen and Go), chatgpt (Responses on your ChatGPT plan; sign in with zelk login), or a server on this machine: ollama, lmstudio or llamacpp (default “openai-compat”)
-reviewer-effort string the auto-mode reviewer’s reasoning effort: low, medium or high (default none: the model’s own)
-sandbox string the launcher that confines commands: none, bwrap (Linux), seatbelt (macOS) or mxc (Windows, set up with zelk sandbox setup). An unattended auto-mode run defaults to bwrap on Linux and uses mxc on Windows when set up (default “none”)
-sandbox-read-only value a host path bwrap shows sandboxed commands read-only, beside the toolchains it finds; ~/ for the home directory, whose credential files stay hidden (repeatable)
-scheduling offer user-authorized scheduling tools: one-shot and recurring messages into the conversation, while it is open
-search-model string model for native WebSearch (default: fast model for the provider family)
-skill-cache string publish recorded skill scripts in an existing private workspace-relative cache (requires bwrap, seatbelt or mxc)
-tool-loading string native loading of deferred tools for the openai and anthropic providers, on models that support it: on (at any base URL, such as a gateway that passes the fields through), off, or auto (only at the vendor’s own URL) (default “auto”)
-trust value something you count as your own environment, for the auto-mode reviewer, such as a repository, bucket or internal service; it authorizes no particular operation on it (repeatable)
-user-browser give the agent your own browser (Chrome, Brave or Edge), signed in as you, through zelk’s extension: it works only in tabs you share or it opens, acts without asking only in tabs you trusted, and never types passwords (set it up with zelk browser extension, then zelk browser pair, or pair in the terminal UI’s Settings)
-user-browser-pace string how input goes in your browser: person (a pointer that travels, keys a tenth of a second apart, pauses between actions, as yours would) or fast (at once) (default “person”)
-verify value a check the agent runs with Verify, as NAME=COMMAND, such as ‘test=go test ./…’: a run can’t end as a success while one has failed (repeatable)
-verify-timeout duration how long a Verify check may run, for projects whose checks take longer (0: ten minutes)
-wait duration output wait, at most one minute
usage: zelk browser [flags] setup | status | extension | pair | native-messaging
setup downloads zelk's pinned Chrome for Testing from Google and installs
it under the state directory, after checking it is exactly the build
zelk's source pins: its size and SHA-256. Nothing else is downloaded or
run. -browser-path uses your own Chrome instead; zelk can't check it.
extension writes zelk's extension for your own browser to -dir, for you
to load unpacked; pair then pairs zelk with it: it shows a one-time code
to type into the extension's panel. On Windows, native-messaging
registers this zelk executable for the current user.
Flag Value Description
-browser-path string setup: use this Chrome or Chromium instead of zelk’s pinned one
-dir string extension: the directory to write zelk’s extension to (default <state>/browser/extension)
-port int pair: the loopback port zelk and the extension meet on (default 27823)
-remove native-messaging: unregister this state directory’s Windows host
-state string session state directory (default “/home/you/.local/state/zelk”)
-verify setup: check every file of the installed Chrome instead of installing
usage: zelk sandbox [flags] setup | status
On Windows, setup installs the MXC sandbox after you agree to Microsoft's telemetry,
and status reports whether it is installed and still verifies, without running it.
Flag Value Description
-accept-telemetry setup: explicitly agree to Microsoft’s required MXC telemetry
-state string session state directory (default “/home/you/.local/state/zelk”)
-verify setup: verify the installed executor and telemetry agreement without running it
usage: zelk mcp [-mcp-config FILE] list | login SERVER | logout SERVER
Lists MCP servers, and signs in to or out of those that require OAuth.
SERVER is a configured server's name, or an HTTP server's URL.
Flag Value Description
-mcp-config string the MCP server configuration file (default “/home/you/.config/zelk/mcp.json”)
usage: zelk providers login chatgpt [-another] | zelk providers logout chatgpt

No flags.

usage: zelk credentials [list]
zelk credentials move -to keychain|file [DOC ...]
zelk credentials purge DOC ...
Lists where zelk keeps each credential document, and whether that place
can be used; moves documents between files in zelk's config directory and
the system keychain (all of them unless named); and deletes documents,
wherever they are. It never shows a credential. DOC is chatgpt, mcp,
browser or provider-keys.

No flags.

usage: zelk policy [-json]
Shows the managed policy an administrator set: the files read, the limits in force and the keys skipped.
Flag Value Description
-json write the policy as JSON