Webrain handles authenticated scraping with an encrypted local vault and a
real-Chrome login flow. Secrets are decrypted in-process and injected via CDP —
the value never passes through the model.
On a 2FA/approval gate it TOTP-injects if a seed is stored and returns
waiting_for_human: true — the human acts in the headed browser, then call
login again.
Reply is status-only. Optional port targets a specific Chrome.
Fallback: WEBRAIN_USER / WEBRAIN_PASS env vars.
List what’s in the vault (names only, never secrets):
webrain launch <service> <profile> [url] spawns a stealth Chrome with a
persistent per-account profile, keyed by "service:profile" so
webrain_login re-attaches. webrain_close_launch kills it (profile + cookies
remain for the next launch).
Export cookies + localStorage to a state file so a login follows you across
machines:
webrain_save_state(service, profile) → <profiles_dir>/<service>/<profile>/state.jsonwebrain_restore_state(service, profile) → import back (navigate to the site first — localStorage is origin-scoped)