npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

leadgrow-trigger-cli

v0.1.0

Published

Ops CLI for trigger.dev — wraps the Management API with multi-profile auth, agent-friendly YAML frontmatter output, and compound ops commands (health, failures, tail, replay-failed, diff-env, overview).

Readme

leadgrow-trigger-cli

Ops CLI for trigger.dev. Wraps the Management API so you can list runs, bulk-replay failures, diff env vars, and pause queues from the terminal — without writing one-off scripts or clicking around cloud.trigger.dev.

Pairs with the official trigger.dev CLI (which stays for init / dev / deploy). This one is for operators.

| | official trigger.dev | lg-trigger | |--|:--:|:--:| | init / dev / deploy | ✓ | — | | List, replay, cancel runs | — | ✓ | | Bulk-replay failed runs | — | ✓ | | Manage schedules (CRUD + activate/deactivate) | — | ✓ | | Manage env vars (CRUD + import from .env) | — | ✓ | | Pause / resume queues, override concurrency | — | ✓ | | Trigger tasks manually + batch-trigger | — | ✓ | | Live tail of runs | — | ✓ | | Health / overview / failures / diff-env | — | ✓ | | Multi-profile (prod, staging, self-hosted) | Basic | ✓ | | Agent-friendly YAML frontmatter output | — | ✓ |

Install

Not on npm yet — install from source.

macOS / Linux / WSL

git clone https://github.com/LeadGrowGTM/leadgrow-trigger.dev-cli.git
cd leadgrow-trigger.dev-cli && npm install && npm run build
npm link            # makes `lg-trigger` available on your PATH
lg-trigger --help

Windows (PowerShell 5.1 or later)

PowerShell 5.1 doesn't support &&. Run each step on its own line:

git clone https://github.com/LeadGrowGTM/leadgrow-trigger.dev-cli.git
cd leadgrow-trigger.dev-cli
npm install
npm run build
npm link
lg-trigger --help

Windows (PowerShell 7+) / Git Bash / cmd

git clone https://github.com/LeadGrowGTM/leadgrow-trigger.dev-cli.git ; cd leadgrow-trigger.dev-cli ; npm install ; npm run build ; npm link

Without npm link

If you prefer not to install globally, just run the built file directly:

node dist/index.js --help

Install direct from Git (no clone)

npm install -g "git+https://github.com/LeadGrowGTM/leadgrow-trigger.dev-cli.git"

Note: the repository URL contains a dot (trigger.dev-cli). When pasting into PowerShell, quote any URL or path that contains a dot followed by a word character to avoid shell parsing surprises.

Quick start

# Interactive 5-step wizard — creates a profile, validates the PAT, links the Claude skill
lg-trigger setup

# Or skip the wizard
lg-trigger auth login --name prod \
  --pat tr_pat_... \
  --project-ref proj_apjuzrcpjamdlrayqcry

lg-trigger auth status                            # confirm you're wired up
lg-trigger overview                               # one-shot project summary
lg-trigger runs list --status FAILED --limit 10   # last 10 failures
lg-trigger docs                                   # full reference

The setup wizard walks through profile name → PAT → project ref → API URL → default env, tests the connection with a real runs.list call, saves to ~/.config/leadgrow-trigger-cli/config.json, and (optionally) symlinks the Claude Code skill into gtme-skills-mitch/skills/. Re-run it any time to add another profile (e.g. staging).

The seven commands you'll use most

lg-trigger overview                                          # project summary
lg-trigger health                                            # failures, paused queues, deactivated schedules
lg-trigger failures --since 24h                              # today's failures with first error line
lg-trigger tail --task webhook-sweep --status FAILED         # live tail
lg-trigger replay-failed --task webhook-sweep --since 1h     # bulk-replay (add --dry-run first!)
lg-trigger diff-env prod staging                             # env var diff between profiles
lg-trigger tasks trigger auto-ramp --payload '{}'            # trigger a task manually

Agent discovery (no MCP required)

One command gives any agent or script the full CLI surface in machine-readable form:

lg-trigger catalog --json                                # complete catalog
lg-trigger catalog --commands-only --group runs --json   # filtered by group

Each command entry carries name, usage, description, args, options (with defaults), dangerous, needs_auth, examples, returns. The catalog also includes the global flag list, exit code map, and the envelope schema — enough for an LLM to plan a multi-step session without reading docs.

Agent-friendly output

Every command emits a YAML frontmatter envelope so LLMs and scripts can parse metadata without guessing:

---
tool: lg-trigger
command: runs list
status: ok
profile: prod
env: prod
project_ref: proj_apjuzrcpjamdlrayqcry
count: 10
next_cursor: run_abc123def
elapsed_ms: 412
ts: 2026-04-21T14:22:01Z
---
[{"id":"run_...","taskIdentifier":"auto-ramp","status":"COMPLETED","durationMs":12340,...}]

Alternative output modes: -o json (raw JSON, no envelope), -o table (human view), -o yaml (full YAML doc), -o quiet (exit code only).

Full command surface

Run lg-trigger docs or lg-trigger docs <topic> for the full reference.

Resource groups (38 commands):

  • runs — list, get, replay, cancel, reschedule, poll, bulk-replay, bulk-cancel
  • schedules — list, get, create, update, delete, activate, deactivate, timezones
  • envvars — list, get, create, update, delete, import
  • queues — list, get, pause, resume, concurrency-override, concurrency-reset
  • tasks — trigger, batch-trigger
  • auth — login, status, whoami
  • profiles — list, use, remove

Compound ops (6 commands):

  • overview — project summary
  • health — failing runs + paused queues + deactivated schedules
  • failures — recent failures with error messages
  • tail — live poll-based tail
  • replay-failed — bulk-replay failed runs matching filters
  • diff-env — env var diff between profiles

Authentication

Uses a trigger.dev Personal Access Token (tr_pat_*) for most operations. Create one at https://cloud.trigger.dev/account/tokens.

Resolution precedence:

  1. CLI flags (--pat, --project-ref, --api-url)
  2. Env vars (TRIGGER_ACCESS_TOKEN, TRIGGER_PROJECT_REF, TRIGGER_API_URL)
  3. Active profile from ~/.config/leadgrow-trigger-cli/config.json

Select a profile per-command with --profile <name> or set LG_TRIGGER_PROFILE.

Multi-profile

lg-trigger auth login --name prod --project-ref proj_prod...
lg-trigger auth login --name staging --project-ref proj_staging...

lg-trigger profiles list
lg-trigger runs list --profile staging --status FAILED
lg-trigger diff-env prod staging

Exit codes

| Code | Meaning | |---|---| | 0 | Success | | 1 | Unknown error | | 2 | Auth / validation | | 3 | Not found | | 4 | Rate limited | | 5 | Server / network |

Development

npm install
npm run build       # tsup
npm run test        # vitest
npm run typecheck   # tsc --noEmit
npm run dev         # watch mode

License

MIT © LeadGrow