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

@holdyapp/sdk

v0.2.1

Published

Holdy SDK · behavioral telemetry + in-product interventions

Readme

@holdyapp/sdk

Holdy SDK · behavioral telemetry + in-product interventions for B2B SaaS Customer Success.

< 15kb gzipped. Sem dependências runtime. ESM + CJS + IIFE builds.


Instalação rápida

Opção 1 · npx (recomendado · 1 minuto)

npx @holdyapp/install <SUA_API_KEY>

Detecta seu framework (Next.js, Vite, Vue, Nuxt, vanilla HTML) e injeta o snippet no lugar certo.

Opção 2 · Script tag (CDN)

<script src="https://app.holdy.com.br/sdk/v0/holdy.iife.js"></script>
<script>
  Holdy.init({
    apiKey: 'hol_live_xxxxxxxx',
    accountId: 'acme-corp',
    autoCapture: true,
  })
</script>

Opção 3 · npm + ES module

npm install @holdyapp/sdk
import { Holdy } from '@holdyapp/sdk'

Holdy.init({
  apiKey: 'hol_live_xxxxxxxx',
  accountId: 'acme-corp',
  autoCapture: true,
})

Identify rico

Holdy nunca sobrescreve dados preenchidos no wizard — sempre COALESCE. Você pode chamar identify() várias vezes; backend só preenche campos vazios.

Holdy.identify({
  account: {
    external_id: 'acct_123',
    name: 'Acme Corp',
    logo_url: 'https://acme.com/logo.png',
    plan: 'Enterprise',
    mrr: 5000,
  },
  user: {
    external_id: 'user_456',
    email: '[email protected]',
    name: 'John Doe',
    role: 'decision_maker',
  },
})

Track manual (eventos canônicos)

20 primitives semânticos validados por taxonomia v1. Lista completa em https://app.holdy.com.br/api/v1/docs.

// Workflow bloqueado · um dos sinais mais úteis pro motor de decisão
Holdy.track('workflow.blocked', {
  workflow: 'invoice-export',
  reason: 'permission_denied',
  severity: 'high',
})

// Fricção detectada (rage clicks, retry loop, etc)
Holdy.track('friction.detected', {
  signal: 'rage_click',
  surface: '/billing',
})

// Sinal de expansão
Holdy.track('expansion.intent_detected', {
  workflow: 'pricing-page-view',
  evidence: 'visited 3x in 7d',
})

Auto-capture (sem código)

Quando autoCapture: true (recomendado em desenvolvimento e produção), o SDK monitora navegação do SPA automaticamente:

  • Carregamento inicial da página
  • pushState / replaceState (Next.js, React Router, Vue Router)
  • popstate (botão voltar)

Cada navegação gera memory.append com {kind: 'route', path, title, referrer}. Você vê dados no Holdy assim que o cliente carregar a página — sem precisar instrumentar nada manualmente.

Track manual continua disponível para os sinais semânticos (workflow/friction/expansion/outcome) que o auto-capture não pode adivinhar.


Render in-product

Quando o backend de decisão sugere uma intervenção (tooltip, banner, modal, checklist, spotlight, CTA), o SDK renderiza automaticamente. Desabilitar:

Holdy.init({
  apiKey: '...',
  renderInterventions: false, // SDK só captura, não renderiza nada
})

Reportar outcome

Holdy.onDecision((decision) => {
  // ... seu código pode reagir
})

// Após o user agir em consequência:
Holdy.reportOutcome(decisionId, 'converted', { value: 99 })

Configuração completa

interface HoldyConfig {
  apiKey: string                  // hol_live_… ou hol_test_…
  apiUrl?: string                 // default: https://app.holdy.com.br/api/v1
  accountId?: string              // ID Holdy ou external_id (use identify pra rico)
  userId?: string
  sessionId?: string
  consumer?: 'ui' | 'csm' | 'agent'
  debug?: boolean                 // console.warn em erros
  renderInterventions?: boolean   // default: true
  autoCapture?: boolean           // default: false · auto page.view tracking
}

Tamanho

Bundle IIFE gzip < 15kb (budget enforced no build).

Licença

MIT