Expand description
Config file support: ~/.recursive/config.toml
Priority chain: CLI flag > env var > config file > hardcoded default. The config file is optional — if absent, we gracefully fall back.
Structs§
- Agent
Section - [agent] section.
- File
Config - Top-level deserialized structure of config.toml.
- Limits
Section [limits]section. Various runtime limits and thresholds.- Permissions
Section - Provider
Section - [provider] section.
- Sandbox
Section [sandbox]section. Lists additional directories the agent may reach beyond the primary workspace.- Search
Section - [permissions] section. Wire-compatible with
crate::permissions::PermissionsConfigbut lives here so config loading does not couple to that crate.[search]section. Web search provider configuration. - Stuck
Section [stuck]section. Stuck detection thresholds.
Functions§
- config_
file_ path - Return the path to the global config file: ~/.recursive/config.toml. Returns None if the home directory cannot be determined.
- load_
layered_ permissions - Load layered permissions from user config and project config.
- secrets_
env_ path - Path of the shell-sourceable secrets file. Mirrors the home-dir
resolution in
config_file_path(honoursRECURSIVE_HOMEfor tests). - set_
secret - Persist a secret (typically an API key) to a 0600 shell-sourceable
env file. The binary does NOT read this file at runtime; the user is
expected to
sourceit from their shell rc so the secret is in the process env whenrecursiveruns. - set_
value - Write a dotted key=value to ~/.recursive/config.toml. Supports dotted keys like “provider.model”, “agent.max_steps”. Creates the file and parent directory if needed.