Login once and reuse local auth
SiteLens stores auth on your machine only — not in SiteLens cloud.
Paths
- Storage state:
~/.sitelens/auth/{profileName}.json - Persistent profile:
~/.sitelens/profiles/{profileName}/
Profile name defaults to your Cursor workspace folder name; you can pass explicit names (default, my-app, …).
Auth modes
| Mode | Behavior |
|---|---|
none | No saved session |
isolated | Fresh context each run (default when no profile) |
storage-state | Load Playwright storage state JSON before navigation |
persistent-profile | Reuse Chromium user data dir (best for “stay logged in”) |
Global config (optional)
// ~/.sitelens/config.json
{
"browser": "chromium",
"auth": {
"mode": "persistent-profile",
"userDataDir": "~/.sitelens/profiles/default",
"storageStatePath": "~/.sitelens/auth/default.json"
}
}
Interactive login flow
sitelens_auth_startwith your login URL and optionalprofileName. Sign in in the headed browser.sitelens_auth_savewith the same profile — writes storage state and keeps the profile directory.sitelens_qa_runwithauthProfileon protected routes.
Security
Never commit ~/.sitelens/, .sitelens/, or *auth-state*.json. Add .sitelens/ to .gitignore.