reacher.config.yaml is an optional configuration file for managing Reacher’s safety and behavior settings. It is designed for settings you want to keep in version control and review as code — particularly the SSH blocklist and audit configuration.
Setup
Environment variables always take precedence over YAML values. If
DRY_RUN=true is set in your environment, the dry_run: false in the YAML file has no effect.Full annotated example
reacher.config.yaml
Settings reference
ssh.blocked_commands
A list of command substrings to block from
ssh_exec. Matching is case-insensitive and substring-based: if any string in this list appears anywhere in the submitted command, the command is rejected before it is sent over SSH.
ssh.allowed_dirs
Optional list of directory prefixes. When set,
ssh_exec only permits commands whose working path starts with one of the listed directories. An empty list (the default) applies no restriction.
Prefix matching means /home/deploy permits /home/deploy/app/ and /home/deploy/logs/, but not /home/other/.
audit.enabled
Controls whether tool calls are written to the audit log. When
true, every call to any Reacher tool produces a JSON log entry containing the timestamp, tool name, sanitized input, and success status.
audit.log_path
File path for the audit log. The file is created if it does not exist and entries are appended on each tool call. In production, use an absolute path and configure log rotation.
dry_run
When
true, ssh_exec returns a simulated response describing the command it would have run, without making any SSH connection. All other tools continue to operate normally.
The current dry-run state is visible in the /health endpoint response:
How the config system works
On startup, Reacher readsreacher.config.yaml from the project root (if it exists) using js-yaml. The parsed YAML values are merged with environment variables according to the following precedence rules:
- Environment variable is set → use the environment variable value, ignore YAML
- Environment variable is not set, YAML value exists → use the YAML value
- Neither is set → use the built-in default
src/lib/config.js handles type coercion for boolean-like variables. For AUDIT_ENABLED, only the exact string "false" disables auditing. For DRY_RUN, only the exact string "true" enables it.
Reloading configuration
1
Edit reacher.config.yaml
Make your changes and save the file.
2
Restart the server
3
Verify the change took effect
Check the startup log output, or query the health endpoint to confirm dry-run state: