@cookiepal-oss/cli
v1.0.1
Published
Command-line tool for crawling sites, categorizing cookies, and building the consent banner bundle.
Readme
@cookiepal-oss/cli
Operator CLI for cookiepal. Crawls a site, serves the dashboard, and builds the banner bundle. One SQLite file drives all three.
Install
npx @cookiepal-oss/cli # interactive menu
# or
pnpm add -g @cookiepal-oss/cli # global install → `cookiepal`Commands
| Command | What it does |
|---|---|
| cookiepal | Interactive menu (Setup, Crawl, Dashboard, Build, Docs, GitHub) |
| cookiepal crawl <url> | Puppeteer-crawls the site, records every cookie, categorises via @cookiepal-oss/cookie-db |
| cookiepal dashboard | Serves the dashboard UI + API on http://localhost:3001 |
| cookiepal build [--format bundle\|config\|both] | Produces dist/cookiepal.bundle.js (IIFE with config baked in) and/or cookiepal-config.ts |
Every subcommand takes --help for the full option list.
DB location
The SQLite database is shared across all cookiepal commands. Its default location follows each OS's user-config convention (resolved via env-paths):
| OS | Default path |
|---|---|
| Linux | $XDG_CONFIG_HOME/cookiepal/db.sqlite (usually ~/.config/cookiepal/db.sqlite) |
| macOS | ~/Library/Preferences/cookiepal/db.sqlite |
| Windows | %APPDATA%\cookiepal\Config\db.sqlite (usually C:\Users\<you>\AppData\Roaming\cookiepal\Config\db.sqlite) |
Override the path per-invocation with --db <path>, or globally with the COOKIEPAL_DB env var. The parent directory is created on first use.
License
MIT. See repo root.
