kosal-link
v0.2.1
Published
Scrape JS-rendered landing pages locally with Playwright. Sign in with GitHub, paste a URL.
Downloads
414
Maintainers
Readme
kosal-link
CLI that scrapes JS-rendered landing pages locally with GitHub auth and usage tracking in Convex.
Install
npm install -g kosal-link
npx playwright install chromiumUsage
kosal-link login
kosal-link scrape https://example.com -o ./out
kosal-link detect https://example.com
kosal-link pick https://example.com --open
kosal-link whoami
kosal-link logoutConfig
Token stored at ~/.config/kosal-link/config.json.
Environment overrides:
KOSAL_LINK_CONVEX_URL— Convex deployment URLKOSAL_LINK_AUTH_URL— landing page auth URL (defaulthttp://localhost:3000/cli/auth)
Development
cd cli
npm install
npm run build
node bin/kosal-link.js scrape https://example.comComponent workflows
Detect likely sections on a page:
kosal-link detect https://example.comUse --clean if you want a stricter shortlist with fewer generic wrapper blocks:
kosal-link detect https://example.com --cleanPick multiple detected components and export them:
kosal-link pick https://example.com --openInteractive picker controls:
↑/↓movespacetoggle current itematoggle allenterconfirmescorqcancel
Export specific detected rows without the picker:
kosal-link pick https://example.com --choose 1,3,5 --mode liveExport every detected component:
kosal-link pick https://example.com --all --openpick also supports --clean if you want the interactive/export flow to start from the stricter shortlist.
Export a rendered subtree by selector:
kosal-link component https://example.com --selector ".pricing-section" -o ./pricing-exportComponent export writes:
component.html— standalone rendered fragment with inline stylescomponent.png— cropped screenshot of the selected nodemeta.json— selector, size, text sample, and captured assetsassets/— downloaded assets referenced by the exported subtree
Export a higher-fidelity replay that keeps the selected component inside the original page context:
kosal-link component-live https://example.com --selector ".pricing-section" -o ./pricing-live
kosal-link serve ./pricing-livecomponent-live writes:
index.html— full scraped pagecomponent-live.html— isolated live replay entrypointcomponent-live.json— replay metadata
When pick is used, it exports one folder per picked component under ./<hostname>-picked/ by default.
