Official Trigv command-line interface. Send notification events from shell scripts, cron jobs, and CI pipelines.
Trigv delivers developer notifications to your team's devices. Your backend sends lightweight JSON events; Trigv queues push delivery. Notification title and body are not stored on Trigv servers — metadata only.
npm install -g @trigv/cliOr run without installing:
npx @trigv/cli send --channel general --title "Hello"export TRIGV_API_KEY="trgv_your_api_key"
trigv send \
--channel general \
--title "Deploy finished" \
--description "Build #42 succeeded in 38s"Create a workspace API key at app.trigv.com. Keys look like trgv_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Resolution order:
TRIGV_API_KEYenvironment variable- macOS Keychain (when available)
~/.config/trigv/credentials(mode0600)
Store a key locally (recommended — interactive hidden prompt):
trigv config set-keyFor automation, pipe from an environment variable (avoids putting the secret in shell history):
printf '%s' "$TRIGV_API_KEY" | trigv config set-keyVerify the key:
trigv connectiontrigv send --channel general --title "Cron job failed" --level error| Flag | Description |
|---|---|
--channel |
Channel slug (required) |
--title |
Notification title (required) |
--description |
Body text |
--image-url |
HTTPS image URL (not stored server-side) |
--url |
Destination URL for the notification (max 2048 characters; not stored server-side) |
--level |
info, success, warning, error (default: info) |
--delivery-urgency |
standard or time_sensitive (default: standard) |
--event-type |
Free-form label (e.g. deploy.completed) |
--idempotency-key |
Dedup key per workspace |
trigv send \
--channel deploys \
--title "Production deploy complete" \
--description "Build #42 succeeded in 38s (commit abc1234)" \
--level success \
--delivery-urgency standard \
--event-type deploy.completed \
--idempotency-key deploy-prod-42 \
--url "https://example.com/deployments/42"info— general information (default)success— completed successfullywarning— attention needederror— failure or alert
standard— normal notifications (default)time_sensitive— iOS Time Sensitive delivery (requires user permission)
When you set --idempotency-key, retries with the same key return the existing event without billing again.
trigv send \
--channel deploys \
--title "Production deploy complete" \
--idempotency-key deploy-prod-42Add --json for machine-readable output on stdout:
trigv send --channel general --title "Hello" --json{"ok":true,"event":{"public_id":"evt_…","status":"queued",...},"duplicate":false}Errors also return JSON when --json is set:
{"ok":false,"error":"Channel not found.","code":"not_found","status_code":404}| Code | Meaning |
|---|---|
0 |
Success |
1 |
Validation or usage error |
2 |
Missing API key / config |
3 |
API or network error |
| Flag / env | Default | Description |
|---|---|---|
TRIGV_API_KEY |
— | Workspace API key |
--base-url |
https://api.trigv.com/api |
API base URL (local: http://trigv-platform.test/api) |
trigv send \
--channel ops \
--title "Nightly backup failed" \
--description "Exit code 1 on db-backup.sh" \
--level error \
--event-type cron.failedtrigv send \
--channel deploys \
--title "CI build failed" \
--level error \
--event-type ci.failed \
--idempotency-key "ci-${GITHUB_RUN_ID}"npm install
npm run build
npm test
npm run lintnpm testTests use mocked HTTP — no live API key required.
See ARCHITECTURE.md for language choice, credential storage, and HTTP client design.
Contributions welcome. Please open an issue before large changes.
MIT