Extract URLs from currently open browser tabs (Firefox, Chrome, Safari)
npm install @johnpc/link-extractorExtract URLs from currently open browser tabs (Firefox, Chrome, Safari).
``bash`
npx @johnpc/link-extractor
Or install globally:
`bash`
npm install -g @johnpc/link-extractor
link-extractor
Extract URLs from Firefox (default):
`bash`
npx @johnpc/link-extractor > tabs.txt
Use the --browser flag to specify which browser:
`bashFirefox (default)
npx @johnpc/link-extractor --browser firefox
$3
Override the default browser profile path:
`bash
macOS Firefox
npx @johnpc/link-extractor -p ~/Library/Application\ Support/Firefox/ProfilesLinux Firefox
npx @johnpc/link-extractor -p ~/.mozilla/firefoxWindows Firefox
npx @johnpc/link-extractor -p %APPDATA%\Mozilla\Firefox\ProfilesmacOS Chrome
npx @johnpc/link-extractor --browser chrome -p ~/Library/Application\ Support/Google/Chrome
`Requirements
- One of: Firefox, Chrome, or Safari
- Supported platforms: macOS, Linux (Firefox/Chrome), Windows (Firefox/Chrome)
$3
Firefox:
- macOS:
~/Library/Application Support/Firefox/Profiles
- Linux: ~/.mozilla/firefox
- Windows: %APPDATA%\Mozilla\Firefox\ProfilesChrome:
- macOS:
~/Library/Application Support/Google/Chrome
- Linux: ~/.config/google-chrome
- Windows: %APPDATA%\Local\Google\Chrome\User DataSafari:
- macOS:
~/Library/Safari (requires Full Disk Access permission)$3
On macOS, Safari extraction requires Full Disk Access:
1. Open System Settings → Privacy & Security → Full Disk Access
2. Add Terminal (or your terminal app)
3. Restart your terminal
How it works
- Firefox: Reads and decompresses
recovery.jsonlz4 (LZ4 compression)
- Chrome: Parses Sessions/Tabs_* files (Chrome's SNSS session format)
- Safari: Queries BrowserState.db SQLite databaseDevelopment
`bash
Install dependencies
npm installBuild
npm run buildRun locally
npm start
``ISC