add config (#494)

* add config

* improvements

* cleaner flags

* fixes

* fixes
This commit is contained in:
Chris Tate
2026-02-17 22:27:44 -06:00
committed by GitHub
parent 76df589aea
commit 9ca182a4df
7 changed files with 858 additions and 36 deletions
+14
View File
@@ -300,6 +300,20 @@ agent-browser eval -b "$(echo -n 'Array.from(document.querySelectorAll("a")).map
- Nested quotes, arrow functions, template literals, or multiline -> use `eval --stdin <<'EVALEOF'`
- Programmatic/generated scripts -> use `eval -b` with base64
## Configuration File
Create `agent-browser.json` in the project root for persistent settings:
```json
{
"headed": true,
"proxy": "http://localhost:8080",
"profile": "./browser-data"
}
```
Priority (lowest to highest): `~/.agent-browser/config.json` < `./agent-browser.json` < env vars < CLI flags. Use `--config <path>` or `AGENT_BROWSER_CONFIG` env var for a custom config file (exits with error if missing/invalid). All CLI options map to camelCase keys (e.g., `--executable-path` -> `"executablePath"`). Boolean flags accept `true`/`false` values (e.g., `--headed false` overrides config). Extensions from user and project configs are merged, not replaced.
## Deep-Dive Documentation
| Reference | When to Use |