CLI tools collection.
This repository currently focuses on export-browser-cookies, a macOS CLI workflow for exporting cookies from Chromium-based browsers and optionally importing them into local automation tools.
- Reads non-expired cookies from your local browser profile
- Decrypts cookie values via macOS Keychain
- Optionally filters by exact domain (
host_key) - Exports cookies as JSON to stdout
- Optionally imports cookies into
agent-browserorpinchtab
- Comet (aliases:
comet,perplexity) - Chrome (aliases:
chrome,google-chrome) - Arc (alias:
arc) - Brave (alias:
brave) - Edge (alias:
edge)
- macOS
- Go 1.19+
- Access to macOS Keychain
cd export-browser-cookies/scripts
go build -o export-cookies ../export-cookies [--browser <name>] [--domain <domain1,domain2,...>] [--profile <profile>] [--import-by <target>] [--help]--browser: Browser name or alias, defaultchrome--domain: Comma-separated domains, exact match on cookiehost_key--profile: Browser profile directory, defaultDefault--import-by: Import target, supportsagent-browserandpinchtab--help/-h: Show usage
Export all non-expired cookies from Chrome:
cd export-browser-cookies/scripts
./export-cookies --browser chromeExport only .github.com cookies:
./export-cookies --browser chrome --domain .github.comExport from a non-default profile:
./export-cookies --browser edge --profile "Profile 1" --domain .github.comExport and import into agent-browser:
./export-cookies --browser chrome --domain .github.com,github.com --import-by agent-browserExport and import into pinchtab:
./export-cookies --browser chrome --domain .github.com --import-by pinchtab- Without
--import-by: prints cookie JSON array to stdout - With
--import-by: imports cookies and prints per-domain summary to stderr
- On first run for a browser, macOS may show a Keychain permission dialog
- If you need a file artifact, redirect output manually (for example
> cookie.json) - Domain matching is exact, usually including a leading dot such as
.github.com