CLI
Configuration
The notifie.json schema, environment overrides, precedence, and how to run the CLI in CI.notifie.json
Configuration is a plain file next to the project rather than a hidden global directory, so it is obvious, reviewable, and per-project. notifie init writes it.
{
"apiKey": "ntf_live_abcdef123456_…",
"baseUrl": "https://notifie.dev"
}| Field | Type | Meaning |
|---|---|---|
apiKey | string | SDK ingest key for this app |
baseUrl | string | Notifie server, defaults to https://notifie.dev |
Both fields are optional, but every server-side check needs apiKey.
Environment overrides
export NOTIFIE_API_KEY="ntf_live_…"
export NOTIFIE_URL="https://staging.example.com"
npx notifie doctorThe environment wins over the file, per field. That lets one checkout point at a staging server, or CI supply a key from a secret store, without editing a tracked file.
| Precedence | Source |
|---|---|
| 1 (highest) | NOTIFIE_API_KEY / NOTIFIE_URL |
| 2 | notifie.json |
| 3 | Built-in default https://notifie.dev |
When the file is broken
A malformed file never crashes the CLI and never silently reverts to a different app. The environment values still apply, and the command reports one of:
notifie.json is not valid JSON.notifie.json must contain a JSON object.notifie.json apiKey and baseUrl must be strings.
Each is followed by the same instruction: repair or delete the file, then rerun notifie init.
Committing the file
In CI
- name: Verify Notifie setup
env:
NOTIFIE_API_KEY: ${{ secrets.NOTIFIE_INGEST_KEY }}
run: npx @notifie-dev/cli@0.1.0-beta.2 doctordoctor exits non-zero while any problem remains, so this fails the build if a merge drops the notification permission, the Firebase wiring, or the key.