π¦ ClawHub
browser-session-archive
by @guobaba1
Extracts and archives chatgpt.com and claude.ai share links to Markdown using Chrome CDP (e.g., ChatGPT or Claude conversations).
π‘ Examples
Quick Start
# Copy script to PATH
cp {baseDir}/scripts/extract.sh /usr/local/bin/
chmod +x /usr/local/bin/extract.shRun
extract.sh "https://chatgpt.com/share/xxx"
extract.sh "https://claude.ai/share/xxx"
Step by Step
# 1. Capture HTML
cd {baseDir}/scripts
CHROME_DEBUG_PORT=9222 TARGET_URL="https://chatgpt.com/share/xxx" \
node capture-cdp.js2. Convert to Markdown (use output path from step 1)
node convert-markdown.js --metadata "~/LookBack/$(date +%Y-%m-%d)/ChatGPT/.metadata.json"
βοΈ Configuration
1. Chrome Debug Mode: Start Chrome with --remote-debugging-port=9222
# macOS
open -a "Google Chrome" --args --remote-debugging-port=9222
# Linux
google-chrome --remote-debugging-port=9222
2. Install Dependencies:
npm install -g ws
TERMINAL
clawhub install browser-session-archive