@kuizuo/get-cookie
v0.1.1
Published
CLI tool to read cookies from local browsers
Downloads
35
Maintainers
Readme
get-local-cookie
A simple CLI and library to fetch cookies for a given URL from local browsers (Chrome, Edge, etc.). Includes npx usage for quick one-off runs.
Requirements
- Node >=24 (for node:sqlite) or Bun (for bun:sqlite)
- Local usage only: this reads from your machine’s browser profiles.
Use
Recommended: npx (no global install needed)
npx @kuizuo/get-cookie <url> --browser chrome --format headerExamples:
# Get cookies for github.com (default: Chrome, JSON)
npx @kuizuo/get-cookie https://github.com
# Use Edge and output as Cookie header
npx @kuizuo/get-cookie https://github.com --browser chrome --format header
# If macOS does not have the right to read the keychain, use sudo to let security read the keychain
sudo npx @kuizuo/get-cookie https://github.com --browser edge --format headerCLI options
<url>: target URL.-b, --browser <browser>: browser type (chrome,edge,brave,arc,vivaldi,opera). Defaultchrome.-f, --format <format>:jsonorheader. Defaultjson.
Use as a library (API)
see: https://github.com/steipete/sweet-cookie#library-usage
Credit
- Powered by
@steipete/sweet-cookie
