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

@trueraft/cli

v0.2.1

Published

Command-line tool for the Trueraft document verification API.

Readme

@trueraft/cli

Command-line tool for the Trueraft verification + reverse-KYC API. Built on top of @trueraft/sdk — same retries, same error semantics, plus colour output and a CI-friendly exit-code contract.

Install

# One-off:
npx @trueraft/cli msme 27AAPFU0939F1ZV

# Or install globally:
npm install -g @trueraft/cli
trueraft msme 27AAPFU0939F1ZV

Requires Node ≥ 18.

Authentication

Set your API key once, then forget about it:

export TRUERAFT_API_KEY=trk_test_…

Or pass --key trk_… on every invocation. The public-lookup commands (msme, litigation, rera, health) work without a key.

Profiles (multi-tenant)

If you work with multiple Trueraft accounts (staging vs prod, multiple client orgs), use a profile config at ~/.trueraft/config.json:

{
  "default": "prod",
  "profiles": {
    "prod":    { "apiKey": "trk_live_…" },
    "staging": { "apiKey": "trk_test_…", "baseB2B": "https://staging.trueraft.com/functions/v1" }
  }
}

Then:

trueraft verify pan ABCDE1234F --profile staging

Resolution order: explicit flag → profile → environment variable → built-in default.

Commands

verify <type> <number>

Single-document verification.

trueraft verify pan      ABCDE1234F
trueraft verify dl       MH1220110012345 --dob 1990-01-01
trueraft verify gst      27ABCDE1234F1Z5
trueraft verify rc       MH12AB1234
trueraft verify aadhaar  123412341234
trueraft verify bank     123456789012 --ifsc HDFC0001234
trueraft verify fasttag  MH12AB1234
trueraft verify chassis  MA3ERLF1S00123456

Optional flags: --ref <id> (caller reference), --idempotency-key <key> (replay-safe).

driver-score <rc> <dl>

Combined RC + DL → 0-100 Driver Trust Score.

trueraft driver-score MH12AB1234 MH1220110012345

vehicle-score <rc>

RC-only → 0-100 Vehicle Trust Score.

trueraft vehicle-score MH12AB1234

badge <gstin|pan|upi>

Lookup a Trueraft Verified badge.

trueraft badge --gstin 27AAPFU0939F1ZV
trueraft badge --pan   ABCDE1234F
trueraft badge --upi   acme@hdfcbank

# Positional value — CLI sniffs the format:
trueraft badge acme@hdfcbank

fraud-feed

Paginated stream of caution / risky entities. Enterprise tier only — returns a clear error if your account flag isn't set.

# Single page
trueraft fraud-feed --since 2026-05-01T00:00:00Z --limit 500

# Stream the entire feed as NDJSON (one row per line, jq-friendly)
trueraft fraud-feed --all --format ndjson > feed.ndjson

Flags: --since <iso> (resume cursor), --limit <n> (max 1000), --format json|ndjson, --all (auto-paginate).

pay-verify <upi|pan|phone>

UPI / phone / PAN trust score.

trueraft pay-verify --upi acme@hdfcbank
trueraft pay-verify --phone +919876543210
trueraft pay-verify --pan ABCDE1234F

# Positional (CLI sniffs):
trueraft pay-verify acme@hdfcbank
trueraft pay-verify +919876543210

msme <gstin>

MSME vendor-fitness score (0-100).

trueraft msme 27AAPFU0939F1ZV

litigation <name> [--pan PAN]

Court records lookup.

trueraft litigation "Rajesh Kumar Sharma"
trueraft litigation "Rajesh Kumar Sharma" --pan ABCDE1234F

rera <reg-no> --state <state> [--type project|agent]

RERA registration check.

trueraft rera P51800012345 --state Maharashtra
trueraft rera A51900099999 --state Maharashtra --type agent

health

Provider health summary.

trueraft health

verify-webhook

Offline HMAC-SHA256 webhook signature verifier — does not hit the network. Useful for CI smoke tests and replaying captured webhook deliveries.

trueraft verify-webhook --body event.json \
  --signature "sha256=abcd…" --secret "$TRUERAFT_WEBHOOK_SECRET"

# From stdin:
curl -s … | trueraft verify-webhook --body - --signature "sha256=…" --secret …

Exits 0 on a valid signature, 3 on mismatch.

Global flags

| Flag | Notes | |---|---| | --key trk_… | API key. Overrides TRUERAFT_API_KEY env. | | --profile <name> | Read credentials from ~/.trueraft/config.json. | | --raw | One-line JSON (good for \| jq). Default is pretty 2-space JSON when piped or pretty verdicts on TTY. | | --json | Alias for --raw (back-compat with 0.1.x). | | --base-b2b URL | Override Edge Functions URL. | | --base-site URL | Override website URL. | | --help, -h | Show usage. trueraft help <command> for per-command help. |

NO_COLOR=1 disables ANSI colour. Non-TTY output is also colour-stripped automatically.

Exit codes

| Code | Meaning | |---|---| | 0 | Success | | 2 | User error — bad flag, missing argument, invalid type | | 3 | API error — 4xx from upstream (bad input, auth, not found) | | 4 | Transport error — 5xx, network failure, timeout | | 1 | Unexpected (shouldn't happen — please file a bug) |

Use these in shell scripts to branch:

trueraft verify pan ABCDE1234F
case $? in
  0) echo "verified" ;;
  3) echo "bad PAN" ;;
  4) echo "Trueraft is down — retry later" ;;
esac

Scripting

# Drop the score with jq
trueraft msme 27AAPFU0939F1ZV --raw | jq .trust_score

# Bulk verify from a CSV
while IFS=, read -r type number; do
  trueraft verify "$type" "$number" --raw
done < docs.csv | jq -s .

# Stream fraud feed into a Postgres COPY
trueraft fraud-feed --all --format ndjson | \
  psql -c "COPY fraud_signals FROM STDIN"

Pair with the SDK

For programmatic / long-running / high-throughput use, reach for @trueraft/sdk directly — the CLI is a thin wrapper over it.

import { Trueraft } from "@trueraft/sdk";
const tr = new Trueraft({ apiKey: process.env.TRUERAFT_API_KEY! });

License

MIT