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

@kieranhunt/crul

v0.1.2

Published

Extract browser cookies and write them as a Netscape-format cookie jar file for curl/wget

Readme

crul

npm version CI License: MIT Node.js >= 18

Extract browser cookies and write them as a Netscape-format cookie jar file, compatible with curl -b, wget --load-cookies, and other tools that speak the Netscape cookie file format.

Uses @steipete/sweet-cookie under the hood to read cookies from Chrome, Edge, Firefox, and Safari.

Install

npm install -g @kieranhunt/crul

Or run directly without installing:

npx @kieranhunt/crul --url https://example.com

Usage

# Extract all cookies for a URL, print to stdout
npx @kieranhunt/crul --url https://example.com

# Write to a file (created with 0600 permissions)
npx @kieranhunt/crul --url https://example.com --output cookies.txt

# Use a specific browser
npx @kieranhunt/crul --url https://example.com --browsers chrome

# Filter to specific cookie names
npx @kieranhunt/crul --url https://example.com --names session --names csrf

# Multiple origins (useful for SSO/OAuth flows)
npx @kieranhunt/crul --url https://app.example.com \
  --origins https://login.example.com \
  --origins https://accounts.example.com

# Pipe directly into curl
curl -b <(npx @kieranhunt/crul --url https://example.com) https://example.com/api

Options

All option names mirror the GetCookiesOptions API from sweet-cookie.

| Option | Description | |---|---| | --url <url> | (required) URL to extract cookies for | | --output <path> | Output file path. Omit to write to stdout | | --browsers <browsers...> | Browser backends: chrome, edge, firefox, safari | | --names <names...> | Filter to specific cookie names | | --origins <urls...> | Additional origins to include | | --profile <profile> | Alias for --chrome-profile | | --chrome-profile <profile> | Chrome profile name, directory, or Cookies DB path | | --edge-profile <profile> | Edge profile name, directory, or Cookies DB path | | --firefox-profile <profile> | Firefox profile name or directory path | | --safari-cookies-file <path> | Override path to Safari Cookies.binarycookies | | --chromium-browser <browser> | macOS Chromium target: chrome, brave, arc, chromium | | --mode <mode> | merge (default) or first | | --include-expired | Include expired cookies | | --timeout-ms <ms> | Timeout for OS helper calls (keychain/keyring/DPAPI) | | --inline-cookies-file <path> | Read inline cookie payload from file | | --inline-cookies-json <json> | Inline cookie payload as JSON string | | --inline-cookies-base64 <b64> | Inline cookie payload as base64-encoded JSON | | --debug | Print extra warnings to stderr |

Output format

The output follows the Netscape cookie file format -- one cookie per line, TAB-delimited:

# Netscape HTTP Cookie File
# https://curl.se/docs/http-cookies.html
# This file was generated by crul.
# Edit at your own risk.

#HttpOnly_.example.com	TRUE	/	TRUE	1735689600	session	abc123
example.com	FALSE	/	FALSE	0	csrf	xyz

Fields: domain, subdomain flag, path, secure, expires (unix seconds, 0 = session), name, value.

Cookies with httpOnly set get the #HttpOnly_ prefix on the domain (recognized by curl, Firefox, etc).

License

MIT