Extract and display cookies from macOS browsers.
Decrypts Chrome's macOS Keychain entries, parses Safari's binary cookie store,
and captures fresh sessions from a throwaway Chrome sign-in.
Get Started
Run without installing:
uvx cookietuner
Or install permanently:
uv tool install cookietuner
What is cookietuner?
A command-line tool that reads cookies straight from your local macOS browser stores. It decrypts Chrome's encrypted cookie database via the macOS Keychain (Chrome 130+ format) and parses Safari's binary Cookies.binarycookies file directly, with no extensions involved.
When a store can't give you what you need, cookietuner capture opens a clean Chrome window instead, waits while you sign in yourself, and keeps the cookies that session set.
Features
- Chrome support — decrypts cookies using macOS Keychain, Chrome 130+ format.
- Safari support — parses the binary cookies format with SameSite detection.
- Throwaway sign-in capture — a fresh Chrome profile, deleted afterwards, for session and HttpOnly cookies that never reach disk.
- Sign in from the Passwords app — optionally loads Apple's iCloud Passwords extension, so nothing is typed.
- Multiple output formats — table, short, line, and JSON.
- Domain filtering — filter by exact domain (
x.commatches.x.com, notapi.x.comordropbox.com). - Profile selection — choose which browser profile to read from.
- Cookie metadata — expiration, Secure, HttpOnly, and SameSite flags.
Usage
List cookies
# Chrome cookies (browser flag is required)
cookietuner cookies -b chrome
# Safari cookies
cookietuner cookies -b safari
# Filter by domain
cookietuner cookies -b chrome -d google.com
# Pick a Chrome profile
cookietuner cookies -b chrome -p "Profile 1"
Output formats
| Format | Flag | Use case |
|---|---|---|
| Full table (default) | -o table |
Browsing all cookie details |
| Short table | -o short |
Just domain, name, value |
| Line | -o line |
Space-separated, for shell scripting |
| JSON | -o json |
Piping into jq or another tool |
Capture a fresh session
Opens Chrome on a temporary profile with none of your history or logins. You sign in by hand; cookietuner never types, fills or sees your credentials. The profile is deleted when the capture ends, including on timeout, Ctrl-C or error.
# Wait for specific cookies, then print them and close the browser
cookietuner capture --url https://example.com/login \
-d example.com --until session_id --until csrf_token -o json
# Without --until, the capture ends when you close the window
cookietuner capture --url https://example.com/login -d example.com
# Sign in from the Passwords app instead of typing
cookietuner capture --url https://example.com/login \
-d example.com --until session_id --passwords
# Route the session through a proxy
cookietuner capture --url https://example.com/login \
-d example.com --proxy socks5://127.0.0.1:1080
Cookie values go to stdout on their own and progress goes to stderr, so the output pipes straight into a secret store:
cookietuner capture --url https://example.com/login \
-d example.com --until session_id -o json | my-secret-store put example-session
This reaches cookies a store reader can't: session cookies, cookies kept only in memory, and HttpOnly cookies on a macOS version that denies access to Chrome's own store.
List browser profiles
# All profiles
cookietuner profiles
# Filter by browser
cookietuner profiles -b chrome
Requirements
- macOS (the tool reads macOS-specific cookie stores).
- Python 3.14+.
- Chrome and/or Safari.
Development
git clone https://github.com/alltuner/cookietuner.git
cd cookietuner
uv sync
uv run pytest
uv run cookietuner
License
Support the project
cookietuner is an open source project built by David Poblador i Garcia through All Tuner Labs.
If this project was useful to you, consider supporting its development.
Built by David Poblador i Garcia with the support of All Tuner Labs.
Made with ❤️ in Poblenou, Barcelona.
Metadata
Release files for cookietuner 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cookietuner-0.2.2.tar.gz | 17.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cookietuner-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.5 kB