Trigv home

Search docs

Getting started
  • Overview
  • How Trigv works
Help
  • Send test
  • API keys
  • Channels
  • Image attachments
Guides
  • All guides
  • cURL
  • Laravel
  • AI coding agents
  • Cursor
  • Claude Code
  • OpenAI Codex
  • Other agents
SDKs
  • All SDKs
  • JavaScript
  • Python
  • PHP
  • Go
  • Ruby
  • CLI
API reference
  • API overview
  • POST /api/v1/events
  • Errors & rate limits
  • API security
More
  • OpenAPI spec
Open in ChatGPT ↗ Ask questions about this page Open in Claude ↗ Ask questions about this page Open Markdown https://trigv.com/docs-md/sdks/cli.md

Trigv CLI

Use the official Trigv CLI to send push notifications from your terminal, shell scripts, cron jobs, CI pipelines, and deploy hooks.

Install

Code
npm install -g @trigv/cli

Or run without installing:

Code
npx @trigv/cli send --channel general --title "Hello"

Send a notification

Code
export TRIGV_API_KEY="trgv_your_api_key"

trigv send \
	--channel general \
	--title "Deploy finished" \
	--description "Production is live" \
	--level success

Command flags

FlagRequiredDescription
--channelYesChannel slug, such as general, deploys, or payments.
--titleYesPush notification title.
--descriptionNoBody text shown in the notification.
--image-urlNoHTTPS image URL for screenshots, charts, camera snapshots, or previews.
--urlNoDestination URL opened from the notification.
--levelNoinfo, success, warning, or error. Defaults to info.
--delivery-urgencyNostandard or time_sensitive. Defaults to standard.
--event-typeNoFree-form event label such as deploy.completed or cron.failed.
--idempotency-keyNoDeduplication key for safe retries.
--jsonNoPrint machine-readable JSON output.

Safe retries with idempotency

Code
trigv send \
	--channel deploys \
	--title "Production deploy complete" \
	--level success \
	--idempotency-key deploy-prod-42

Retries with the same key return the existing event instead of billing and sending another alert.

Authentication and config

The CLI looks for credentials in this order:

  1. TRIGV_API_KEY environment variable
  2. macOS Keychain, when available
  3. ~/.config/trigv/credentials

Store a key interactively:

Code
trigv config set-key

Verify the key:

Code
trigv connection

Use --base-url only for local development or custom API environments.

JSON output

Use --json when another script needs to read the result.

Code
trigv send --channel general --title "Hello" --json

Successful responses include ok, event, and duplicate. Error responses include ok: false, error, code, and status_code.

Exit codes

CodeMeaning
0Success.
1Validation or usage error.
2Missing API key or config.
3API or network error.

Good places to use it

  • CI/CD pipelines and deploy scripts
  • Local shell scripts and scheduled jobs
  • Any workflow where adding a single terminal command is easier than writing code

Additional resources

npm NPM package Install the official Trigv CLI from npm. Source code View the Trigv CLI source on GitHub.
Previous Ruby Next API overview

On this page

    Native push alerts for developers. Send alerts from webhooks, cron jobs, and scripts. We deliver alerts to your devices, but don't keep the message or notification history on our servers.

    Follow @trigvapp →

    Built by Harish Chouhan

    Product

    • Features
    • How it works
    • Pricing
    • Docs
    • Integrations
    • SDKs
    • API
    • Full LLMs text

    Company

    • About
    • Support
    • Changelog

    Legal

    • Terms & Conditions
    • Privacy Policy
    • Cookie Policy
    • API Security
    All systems ok. Get back to coding.

    © 2026 Webtions OU (dba Trigv)