npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@plimeor/browser-peek

v0.1.1

Published

Read cookies and local storage from local browser profiles (Chrome, Safari)

Readme

@plimeor/browser-peek

Read cookies and local storage from local browser profiles, straight from the command line. macOS, Linux, and Windows.

Two command groups — cookie and storage — each with list and get. Pick a browser (via flag) and a profile (via picker), then either list a store or look a value up by name.

Install

bun add --global @plimeor/browser-peek

Or run without installing:

bunx @plimeor/browser-peek cookie list

First command

# List all cookies for Chrome's current profile
browser-peek cookie list

Commands

Each store has its own group: cookie for cookies, storage for local storage. Both groups expose list and get.

cookie list · storage list

Without --domain, list prints an overview: each origin and how many entries it holds, busiest first. Add --domain to drill into one site and see the actual entries.

browser-peek cookie list                         # overview of every origin
browser-peek cookie list --domain github.com     # entries for one site
browser-peek storage list --domain github.com --full   # full values, no truncation

Both views cap at 50 rows by default. Raise it with --limit N (--limit 0 for no cap) or lift it entirely with --all.

cookie get <name> · storage get <name>

Look up an entry by name within the store.

  • Exactly one match → printed directly.
  • No match or several → an interactive picker opens.
browser-peek cookie get session_id                     # may prompt to disambiguate
browser-peek cookie get session_id --domain mysite.com # narrow first, usually one hit
browser-peek storage get theme                         # local storage by key

--domain is the recommended disambiguator: names are rarely unique across sites, so filtering by host collapses the candidate set.

Options

| Option | Shortcut | Description | | --- | --- | --- | | --browser <chrome\|safari> | -b | Browser to read. Default: chrome. | | --profile <id\|name> | -p | Profile to use. Skips the picker. | | --domain <text> | -d | Case-insensitive substring filter on origin/host. Switches list to detail rows. | | --limit <n> | -l | (list) Max rows/origins to show. 0 = no limit. Default: 50. | | --all | -a | (list) Show everything; overrides --limit. | | --full | | (list) Show full values instead of truncating. | | --json | | (get) Emit a JSON result envelope; disables all prompts. |

get --json never prompts. If a browser has more than one profile, pass --profile explicitly.

Browser support

| Browser | Cookies | Local Storage | Notes | | --- | --- | --- | --- | | Chrome | ✅ | ✅ | Verified on macOS. | | Safari | ⚠️ | ⚠️ | macOS only. Requires Full Disk Access; profile selection limited to Default. Latest Safari only. |

Per platform:

| Platform | Chrome cookies | Chrome local storage | | --- | --- | --- | | macOS | ✅ | ✅ | | Linux | ✅ | ✅ | | Windows | ❌ (DPAPI / App-Bound Encryption — not yet) | ✅ |

The browser layer is an adapter registry, so adding Firefox (or Edge, Brave, etc.) later is a drop-in.

Permissions

  • Chrome cookies on macOS are encrypted with a key in the Keychain. The first read triggers a one-time Keychain prompt — approve it.
  • Chrome cookies on Linux are encrypted with a key in the system keyring (GNOME Keyring / KWallet), read via secret-tool (libsecret) — install it and unlock your login keyring. Without a keyring, Chrome's hardcoded fallback key is used automatically.
  • Safari data is protected by the system. Grant your terminal Full Disk Access in System Settings → Privacy & Security → Full Disk Access.

How it works

Browsers hold exclusive locks on their databases while running, and reading the live files risks corruption. Each adapter copies the relevant data into a throwaway temp directory and reads the copy:

  • Chrome cookies — SQLite (bun:sqlite). v10/v11 values are AES-128-CBC decrypted with the "Chrome Safe Storage" key — from the macOS Keychain, or on Linux from the system keyring (v11) or a hardcoded fallback (v10); the SHA256(host_key) prefix that recent Chrome prepends is stripped.
  • Chrome local storage — LevelDB (level); META:/VERSION keys skipped, UTF-16/Latin-1 value encodings decoded.
  • Safari cookies — the Cookies.binarycookies binary format.
  • Safari local storage — WebKit .localstorage SQLite files.

Library API

import { getAdapter } from '@plimeor/browser-peek'

const chrome = getAdapter('chrome')
const profile = await chrome.defaultProfile()
const cookies = await chrome.readCookies(profile!)

Exports: getAdapter, BROWSER_IDS, chromeAdapter, safariAdapter, BrowserPeekError, and the BrowserAdapter / StoreRecord / Profile types.