@checkbox-site/cli 0.4.4 → 0.4.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +5 -3
  2. package/dist/checkbox.js +949 -301
  3. package/package.json +17 -12
package/README.md CHANGED
@@ -67,13 +67,15 @@ Config reference, exit codes and an example summary: https://checkbox.site/docs/
67
67
  ## Credentials
68
68
 
69
69
  Only `--online` checks and the account commands need a key. Resolution order: `--api-key` flag → `CHECKBOX_API_KEY`
70
- → `CHECKBOX_SECRET_KEY` → the key saved by `checkbox login` (`~/.config/checkbox/config.json`, honouring
70
+ → `CHECKBOX_SECRET_KEY` (environment) → `CHECKBOX_SECRET_KEY` in this project's `.env.local` / `.env` /
71
+ `.checkbox/keys.env` (the working folder, then parent folders up to the repository root) → the key saved by `checkbox login` (`~/.config/checkbox/config.json`, honouring
71
72
  `XDG_CONFIG_HOME`; `CHECKBOX_CONFIG_DIR` overrides; file mode 0600). The API base is `--api-base` →
72
- `CHECKBOX_API_BASE` → stored `api_base` → `https://app.checkbox.site`.
73
+ `CHECKBOX_API_BASE` → stored `api_base` → `https://app.checkbox.site`. When a project key and a different saved login
74
+ both exist, the CLI prints which one it used (stderr), and `checkbox whoami` shows `key_source` and `key_file`.
73
75
 
74
76
  | Command | What it does |
75
77
  |---|---|
76
- | `checkbox init [--yes] [--json]` | one browser approval (device login), then keys in `.env.local`, snippet in the root layout, site + Terms / policies registered, Stripe test subscription (with permission), first checks, owner email; `--verify` re-checks after a deploy; `--ci` only adds CI (`checkbox ci init`) |
78
+ | `checkbox init [--yes] [--json]` | one browser approval (device login), then keys in `.env.local` (not when that file is tracked by git or the folder is deployed as it is: the key then stays only in `~/.config/checkbox/config.json`), the SRI-pinned snippet in the root layout, site + Terms / policies registered, Stripe test subscription (with permission; only a Stripe restricted TEST key, `rk_test_…` in `STRIPE_RESTRICTED_KEY`, is used: `sk_test_` and live keys are refused with how to make one), first checks, owner email; `--verify` re-checks after a deploy; `--ci` only adds CI (`checkbox ci init`) |
77
79
  | `checkbox login [--api-key <key>\|--stdin]` | verifies the key with `GET /v1/account`, then saves it |
78
80
  | `checkbox whoami` | account, mode (test/live) and where the key came from |
79
81
  | `checkbox logout` | forgets the stored key |