Skip to content
Notifie
Documentation
DocsCLI

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.

notifie.json
{
  "apiKey": "ntf_live_abcdef123456_…",
  "baseUrl": "https://notifie.dev"
}
FieldTypeMeaning
apiKeystringSDK ingest key for this app
baseUrlstringNotifie server, defaults to https://notifie.dev

Both fields are optional, but every server-side check needs apiKey.

Environment overrides

Terminal
export NOTIFIE_API_KEY="ntf_live_…"
export NOTIFIE_URL="https://staging.example.com"
npx notifie doctor

The 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.

PrecedenceSource
1 (highest)NOTIFIE_API_KEY / NOTIFIE_URL
2notifie.json
3Built-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

.github/workflows/verify.yml
- name: Verify Notifie setup
  env:
    NOTIFIE_API_KEY: ${{ secrets.NOTIFIE_INGEST_KEY }}
  run: npx @notifie-dev/cli@0.1.0-beta.2 doctor

doctor 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.