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

@triagly/cli

v0.3.0

Published

CLI for querying Triagly feedback data (AI agents, automation)

Readme

@triagly/cli

Query Triagly feedback data from the command line or AI agents.

Prerequisites

  • Node.js >= 18

Installation

npm install -g @triagly/cli
# or
npx @triagly/cli <command>

Quick Start

# 1. Authenticate (opens browser)
triagly login

# 2. List recent feedback
triagly list

# 3. Filter and pretty-print
triagly list --status new --classification bug --pretty

Authentication

Interactive login (recommended)

triagly login

Opens your browser for GitHub OAuth. After authenticating, the CLI creates a tsk_live_... API key for your project and saves it to ~/.triagly/config.json. You won't need to do this again unless you log out.

triagly logout   # remove stored credentials

Environment variable (CI / headless)

export TRIAGLY_API_KEY="tsk_live_..."
export TRIAGLY_PROJECT_ID="<uuid>"

triagly list

Per-command flag

triagly list --api-key tsk_live_... --project <uuid>

Priority order (highest wins): --api-key flag → TRIAGLY_API_KEY env → ~/.triagly/config.json

Switching Projects

If your account has multiple projects, triagly login selects the first one. To switch:

triagly use <project-id>

Or set TRIAGLY_PROJECT_ID in your environment.

Commands

triagly list

List feedback items for the active project.

triagly list [options]

| Option | Description | Default | |--------|-------------|---------| | --status <value> | Filter by status: new, in_progress, resolved, dismissed | — | | --classification <value> | Filter by AI classification: bug, feature, improvement, question | — | | --sentiment <value> | Filter by AI sentiment: critical, high, medium, low | — | | --source-channel <value> | Filter by source channel | — | | --tags <csv> | Filter by tags (comma-separated) | — | | --since <date> | ISO date lower bound (e.g. 2026-01-01) | — | | --until <date> | ISO date upper bound | — | | --limit <n> | Results per page (1–100) | 20 | | --cursor <token> | Pagination cursor from previous response | — | | --sort <field> | created_at or ai_priority_score | created_at | | --order <dir> | asc or desc | desc | | --project <id> | Override active project | — | | --api-key <key> | Override stored API key | — | | --pretty | Human-readable table output | — |

Examples:

# Critical bugs, newest first
triagly list --classification bug --sentiment critical --pretty

# Open items since January
triagly list --status new --since 2026-01-01

# Paginate
triagly list --limit 10
triagly list --limit 10 --cursor <token-from-previous-response>

# Sorted by AI priority score
triagly list --sort ai_priority_score --order desc --limit 5

Output (JSON by default):

{
  "data": [
    {
      "id": "...",
      "title": "Login button broken on Safari",
      "status": "new",
      "ai_classification": "bug",
      "ai_sentiment": "critical",
      "ai_priority_score": 0.92,
      "tags": ["auth", "safari"],
      "source_channel": "widget",
      "created_at": "2026-02-20T10:00:00Z"
    }
  ],
  "meta": {
    "total": 142,
    "limit": 20,
    "has_more": true,
    "next_cursor": "MjAyNi0wMi0yMFQxMDowMDowMFo6YWJjZA=="
  }
}

triagly get <feedback-id>

Fetch a single feedback item with full detail.

triagly get <uuid> [--project <id>] [--api-key <key>] [--pretty]

Returns id, title, description, status, ai_* fields, tags, reporter_email, source_channel, metadata, screenshot_url, timestamps.


triagly stats

Aggregate statistics for the active project.

triagly stats [--since <date>] [--until <date>] [--project <id>] [--api-key <key>] [--pretty]

Output:

{
  "period": { "since": "2026-01-01", "until": "2026-02-24" },
  "total": 312,
  "by_status": { "new": 142, "in_progress": 58, "resolved": 100, "dismissed": 12 },
  "by_classification": { "bug": 89, "feature": 110, "improvement": 88, "question": 25 },
  "by_sentiment": { "critical": 12, "high": 45, "medium": 180, "low": 75 },
  "by_source_channel": { "widget": 200, "email": 80, "csv": 32 },
  "avg_priority_score": 0.61,
  "top_tags": [["auth", 34], ["performance", 28], ["mobile", 22]]
}

triagly export

Export feedback to JSON or CSV (max 5,000 rows).

triagly export [options]

| Option | Description | Default | |--------|-------------|---------| | --format <fmt> | json or csv | json | | --output <file> | Write to file instead of stdout | stdout | | --status <value> | Same filters as list | — | | --classification <value> | | — | | --sentiment <value> | | — | | --since <date> | | — | | --until <date> | | — | | --project <id> | | — | | --api-key <key> | | — |

Examples:

# CSV to file
triagly export --format csv --output ./feedback.csv

# JSON filtered export
triagly export --format json --status new --since 2026-01-01 --output ./new-feedback.json

# Pipe to jq
triagly export --format json | jq '[.[] | select(.ai_priority_score > 0.8)]'

AI Agent Usage

The CLI is designed to be called by AI agents as a subprocess. All output goes to stdout as JSON; errors go to stderr as JSON. This makes it easy to parse in any language.

Claude (tool use / subprocess)

import subprocess, json

result = subprocess.run(
    ["triagly", "list", "--status", "new", "--sentiment", "critical", "--limit", "10"],
    capture_output=True, text=True
)
data = json.loads(result.stdout)
print(f"{data['meta']['total']} critical items")

OpenAI function calling

Define the tool:

{
  "name": "list_feedback",
  "description": "List feedback from Triagly",
  "parameters": {
    "type": "object",
    "properties": {
      "status": { "type": "string", "enum": ["new", "in_progress", "resolved", "dismissed"] },
      "classification": { "type": "string", "enum": ["bug", "feature", "improvement", "question"] },
      "limit": { "type": "integer", "minimum": 1, "maximum": 100 }
    }
  }
}

Execute:

args = ["triagly", "list"]
if params.get("status"): args += ["--status", params["status"]]
if params.get("classification"): args += ["--classification", params["classification"]]
if params.get("limit"): args += ["--limit", str(params["limit"])]

result = subprocess.run(args, capture_output=True, text=True)

CI / GitHub Actions

- name: Export feedback report
  env:
    TRIAGLY_API_KEY: ${{ secrets.TRIAGLY_API_KEY }}
    TRIAGLY_PROJECT_ID: ${{ secrets.TRIAGLY_PROJECT_ID }}
  run: |
    npx @triagly/cli export --format csv --output feedback-report.csv

Exit Codes

| Code | Meaning | |------|---------| | 0 | Success | | 1 | Auth error (missing or invalid key) | | 2 | Network or API error | | 3 | Invalid arguments | | 4 | Rate limited (1,000 req/min) |


Configuration File

~/.triagly/config.json (written by triagly login, updated by triagly use):

{
  "apiKey": "tsk_live_...",
  "projectId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "baseUrl": "https://bssghvinezdawvupcyci.supabase.co/functions/v1"
}

Scopes

CLI-generated API keys have the feedback:read scope only. The CLI is entirely read-only — it cannot create, update, or delete feedback.