CLI
Build
Package the banner as a drop-in script.
cookiepal buildReads the SQLite file, renders the final CookiepalConfig, and writes a self-contained artifact you can drop onto any page.
Flags
--format <format>—bundle,config, orboth. Defaultbundle.-o, --output <path>— output file path. Defaults to~/.config/cookiepal/builds/<site-slug>/cookiepal.bundle.js(platform equivalents on macOS/Windows viaenv-paths).--site <url>— target site URL. Required only if the DB has more than one site.
The SQLite file read by build is resolved from $COOKIEPAL_DB, falling back to ~/.config/cookiepal/db.sqlite.
Formats
bundle— the consent runtime IIFE concatenated with a bootstrap line that callswindow.cookiepal.run(config)with your baked-in config. Default output:~/.config/cookiepal/builds/<site-slug>/cookiepal.bundle.js.config— acookiepal-config.tsfile exportingconfig: CookiepalConfig. Output:./cookiepal-config.ts.both— writes both files.
Deploying the bundle
Drop the generated bundle.js into your site's <head>:
<script src="/cookiepal.bundle.js"></script>It's an IIFE with its namespace flattened to window.cookiepal — no module loader required.