chrome.storage areas from the terminal.
storage talks to a running dev session and runs the storage call inside the extension itself, so you see exactly what your code sees. No DevTools, no temporary console.log.
The session must run with the control channel unlocked: start it with extension dev --allow-control. A refusal names the missing flag.
When to use storage
- You want to check what your extension persisted without wiring up a debug UI.
- A test or agent needs to seed storage state before exercising a flow.
- You want to flip a stored feature flag in a live session and watch the effect.
Usage
local area, then one key, then write a value:
Arguments and flags
How values are parsed
--value is parsed as JSON, so '{"theme": "dark"}', '42', and 'true' arrive typed. Input that is not valid JSON falls back to a raw string, so --value hello stores the string "hello" without extra quoting.
set requires both --key and --value. Leaving either out fails with E_ARGS before any connection is made. Any action other than get or set fails the same way.
Failure modes
- No session for the browser:
E_SESSION_NOT_FOUND, with the exactextension dev --allow-controlcommand to run. - Session running without
--allow-control: the connection is refused and the error names the flag. - The storage call threw inside the extension (for example, writing to the read-only
managedarea):E_STORAGE. - The call outlived
--timeout:E_TIMEOUT.
0 on success and 1 on any failure. Machine consumers should read the envelope from --output json (see Result envelope).

