~/.zerotwo/config.toml, and you can add project overrides with .zerotwo/config.toml files. For security, ZeroCode loads project .zerotwo/ layers only when you trust the project.
ZeroCode configuration file
ZeroCode stores user-level configuration at~/.zerotwo/config.toml. To scope settings to a specific project or subfolder, add a .zerotwo/config.toml file in your repo.
To open the configuration file from the ZeroTwo desktop app, select the gear icon in the top-right corner, then select ZeroCode Settings > Open config.toml.
The CLI and desktop app share the same configuration layers. You can use them to:
- Set the default model and provider.
- Configure approval policies and sandbox settings.
- Configure MCP servers.
Configuration precedence
ZeroCode resolves values in this order (highest precedence first):- CLI flags and
--configoverrides - Project config files:
.zerotwo/config.toml, ordered from the project root down to your current working directory (closest wins; trusted projects only) - Profile files selected with
--profile profile-name(~/.zerotwo/profile-name.config.toml) - User config:
~/.zerotwo/config.toml - System config (if present):
/etc/zerotwo/config.tomlon Unix - Built-in defaults
config.toml and keep profile files focused on the values that differ.
If you mark a project as untrusted, ZeroCode skips project-scoped .zerotwo/ layers, including project-local config, hooks, and rules. User and system config still load, including user/global hooks and rules.
For one-off overrides via -c/--config (including TOML quoting rules), see Advanced Config.
On managed machines, your organization may also enforce constraints via
requirements.toml (for example, disallowing approval_policy = "never" or
sandbox_mode = "danger-full-access"). See Managed
configuration and Admin-enforced
requirements.
Common configuration options
Here are a few options people change most often:Default model
Choose the model ZeroCode uses by default in the CLI and IDE.Approval prompts
Control when ZeroCode pauses to ask before running generated commands.untrusted, on-request, and never, see Run without approval prompts and Common sandbox and approval combinations.
Sandbox level
Adjust how much filesystem and network access ZeroCode has while executing commands..git/.zerocode paths and network defaults), see Sandbox and approvals, Protected paths in writable roots, and Network access.
Permission profiles
ZeroCode also supports named permission profiles for reusable filesystem and network policies. Built-in profiles are:read-only, :workspace, and
:danger-full-access. Custom profiles use [permissions.<name>] tables and a
matching default_permissions value. See Permissions.
Windows sandbox mode
When running ZeroCode natively on Windows, set the native sandbox mode toelevated in the windows table. Use unelevated only if you don’t have administrator permissions or if elevated setup fails.
Web search mode
ZeroCode enables web search by default for local chats and serves results from a web search cache. The cache is an ZeroTwo-maintained index of web results, so cached mode returns pre-indexed results instead of fetching live pages. This reduces exposure to prompt injection from arbitrary live content, but you should still treat web results as untrusted. If you are using--yolo or another full access sandbox setting, web search defaults to live results. Choose a mode with web_search:
"cached"(default) serves results from the web search cache."indexed"permits external web access only when the search index gates the request."live"fetches the most recent data from the web (same as--search)."disabled"turns off the web search tool.
Reasoning effort
Tune how much reasoning effort the model applies when supported.Communication style
Set a default communication style for supported models./personality or per thread/turn when using the app-server APIs.
TUI keymap
Customize terminal shortcuts undertui.keymap. Selected composer actions fall back to matching tui.keymap.global bindings; context-specific bindings take precedence when supported. An empty list unbinds the action.
Command environment
Control which environment variables ZeroCode forwards to spawned commands. Use keyed filters to keep only the variables you need:ignore_default_excludes defaults to true, which skips automatic filtering
for variable names containing KEY, SECRET, or TOKEN. Set it to false
when you want that automatic filtering. For exclusion rules, precedence, and
legacy configuration, see Shell environment
policy.
Log directory
Override where ZeroCode writes local log files. Settinglog_dir explicitly also
enables the opt-in plaintext TUI log, zerocode-tui.log, in that directory.
Feature flags
Use the[features] table in config.toml to toggle optional and experimental capabilities.
Common feature flags
This table lists common user-facing flags, not every internal or
under-development feature. The Maturity column uses labels such as
Experimental, Beta, and Stable. See Feature
Maturity for how to interpret these labels.
Omit feature keys to keep their defaults.
For lifecycle hook configuration, see Hooks.
Enabling features
- In
config.toml, addfeature_name = trueunder[features]. - From the CLI, run `
- To enable more than one feature, run `
- To disable a feature, set the key to
falseinconfig.toml.