sincecutoff.com
← all changes

playwright-cli browser storage and authentication state controls

Introduced 2026-02-04 · score 0.97

HOW TO USE IT

When persisting login state or debugging browser storage, use `playwright-cli state-save` and `state-load` for a state file, and the cookie, localStorage, or sessionStorage commands to inspect or change entries.

playwright-cli state-save auth.json playwright-cli state-load auth.json
playwright-cli cookie-list playwright-cli cookie-get <name> playwright-cli cookie-set <name> <value> --domain=<domain> playwright-cli cookie-delete <name> playwright-cli cookie-clear
playwright-cli localstorage-list playwright-cli localstorage-get <key> playwright-cli localstorage-set <key> <value> playwright-cli localstorage-clear playwright-cli sessionstorage-list playwright-cli sessionstorage-set <key> <value> playwright-cli sessionstorage-clear

WHY THIS HELPS

Persist browser login state or inspect and change browser storage while debugging a web application.

REQUIREMENTS AND LIMITATIONS

  • Version: v0.0.63
  • state-save [filename]: Saves browser state; filename is optional. Example: `auth.json`.
  • state-load <filename> (required): Loads browser state from the named file.
  • cookie-get <name>; cookie-delete <name> (required): Cookie name to retrieve or delete.
  • cookie-set <name> <value> (required): Cookie name and value; `--domain=<domain>` selects its domain.
  • localstorage-get <key>; localstorage-set <key> <value> (required): Storage key to retrieve, or key and value to set.
  • sessionstorage-set <key> <value> (required): Storage key and value to set.
  • Docs conflict: The current official CLI reference documents `localstorage-delete`, `sessionstorage-get`, and `sessionstorage-delete`, which the v0.0.63 release note does not list. It also documents session-storage get and delete examples absent from that release note; no claim about their availability in v0.0.63 is made. Source: https://github.com/microsoft/playwright-cli/blob/main/skills/playwright-cli/references/storage-state.md

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card