@withpanache/cli
v0.17.1
Published
Panache CLI for non-Next.js projects. Push deps manifests, inject CSP reporting into framework configs, and signal deployments from CI.
Maintainers
Readme
@withpanache/cli
Panache CLI for non-Next.js projects. Use it in your CI (GitLab, GitHub Actions, etc.) when you can't use the @withpanache/nextjs wrapper — for example when you deploy a static export to Firebase Hosting, Cloudflare Pages, or Netlify.
Install
npm install --save-dev @withpanache/cli
# or
pnpm add -D @withpanache/cliOr run it ad-hoc with npx:
npx @withpanache/cli ingest depsCommands
withpanache ingest deps
Detect the lockfile (npm / pnpm / yarn classic / yarn berry), parse production dependencies, and push the manifest to Panache. Equivalent of what the Next.js plugin does at build time.
PANACHE_SITE_TOKEN=pnch_... withpanache ingest depswithpanache csp inject <file>
Inject Panache CSP reporting into a config file. Dry-run by default; pass --write to apply.
PANACHE_CSP_TOKEN=pncsp_... withpanache csp inject firebase.json --writeSupported formats: firebase.json and raw CSP files (auto-detected by filename; pass --format firebase|raw to override).
withpanache deploy
Signal a deployment to Panache so it re-runs the HTTP checks against the live URL. Used in CI flows where there's no preview URL per branch (e.g. Firebase Hosting static export).
PANACHE_SITE_TOKEN=pnch_... withpanache deploy --url https://my-site.web.appEnvironment variables
| Variable | Purpose |
|---|---|
| PANACHE_SITE_TOKEN | Bearer token for ingest deps and deploy. |
| PANACHE_CSP_TOKEN | CSP token (pncsp_<32hex>) for csp inject. |
| PANACHE_API_URL | Override the ingest API URL (default: https://withpanache.dev). |
| PANACHE_CSP_ENDPOINT | Override the CSP report endpoint (default: https://csp.withpanache.dev). |
| PANACHE_CSP_LEARNING_MODE | 1/true/yes enables Report-Only mode. |
| PANACHE_DEFAULT_BRANCH | Default branch name (default: main). |
License
MIT
