Install any skill in seconds. Free to start, no credit card required.
Get Started Free →How Xberg resolves configuration — CLI-mode and server/MCP-mode precedence orders, config file auto-discovery (xberg.{toml,yaml,json}), field-level inline JSON merge (merge_json_into_config), config file formats, and apply_extraction_overrides. Load when adding a config flag or env var, changing config precedence, or debugging why a setting is or isn't taking effect.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | -43% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -32% | 0% |
| case-09 | ✗→✓ | ▲ Improved | -56% | 0% |
| case-14 | ✗→✓ | ▲ Improved | -48% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -70% | 0% |
--ocr, --output-format, --chunk)--config-json or --config-json-base64)--config path.toml)xberg.{toml,yaml,json} in cwd/parents)--host, --port)XBERG_HOST, XBERG_PORT)[server] section127.0.0.1:8000)Searches current directory and parents for xberg.toml, xberg.yaml, or xberg.json. Stops at first match.
Field-level merge (not whole-object replacement):
rustfn merge_json_into_config(base: &ExtractionConfig, json: Value) -> Result<ExtractionConfig> { let mut config_json = serde_json::to_value(base)?; // Merge fields from json into config_json serde_json::from_value(merged)? }
Use --config-json-base64 for shell escaping.
TOML (xberg.toml):
tomluse_cache = true [ocr] backend = "tesseract" languages = ["eng", "deu"] [security_limits] max_archive_size = 524288000
YAML and JSON follow equivalent structure.
In commands.rs: apply_extraction_overrides() applies individual flags on top of merged config.
--config-json-base64 for shell-safe JSON passing[server] section + extraction configOther measured skills in the registry, with their headline benchmark lift.