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

tentacle-sdk

v0.0.5

Published

SDK for the Tentacle platform

Readme

Tentacle SDK

TypeScript SDK for the Tentacle streaming platform API. Provides type-safe access to Twitch and Kick events in real-time.

Note: This SDK is currently in alpha. The API may change between versions.

Installation

# Install the latest alpha release
npm install tentacle-sdk@alpha

# Or with a specific version
npm install [email protected]

The SDK works with both ESM and CommonJS projects, and includes full TypeScript type definitions.

Quick Start

import { TentacleClient } from 'tentacle-sdk'

const client = new TentacleClient({
  baseUrl: 'https://api.tentacle.live',
  accessToken: 'your-access-token',
})

// Subscribe to realtime Twitch/Kick events
const unsubscribe = client.realtime.subscribe({
  onEvent: (event) => {
    switch (event.kind) {
      case 'StreamChatMessage':
        // Chat message from Twitch or Kick
        const msg = event.payload
        console.log(`[${msg.$platform}] ${msg.$text}`)
        console.log(`Viewer ID: ${msg.$viewerId}`)
        break

      case 'StreamEvent':
        // Stream event (follow, sub, raid, cheer, etc.)
        const evt = event.payload
        if (evt.$platform === 'twitch') {
          switch (evt.$type) {
            case 'channel.follow':
              console.log(`New Twitch follower: ${evt.userDisplayName}`)
              break
            case 'channel.subscribe':
              console.log(`New Twitch sub: ${evt.userDisplayName}`)
              break
            case 'channel.raid':
              console.log(`Raid from ${evt.fromBroadcasterUserDisplayName} with ${evt.viewers} viewers`)
              break
            case 'channel.cheer':
              console.log(`Cheer: ${evt.bits} bits from ${evt.userDisplayName}`)
              break
          }
        } else if (evt.$platform === 'kick') {
          switch (evt.$type) {
            case 'channel.followed':
              console.log(`New Kick follower: ${evt.username}`)
              break
            case 'channel.subscription.new':
              console.log(`New Kick sub: ${evt.username}`)
              break
          }
        }
        break

      case 'StreamViewerActivity':
        console.log(`Viewer activity: ${event.payload.viewerId}`)
        break
    }
  },
  onError: (error) => console.error('Connection error:', error),
  onOpen: () => console.log('Connected to realtime events!'),
  onClose: () => console.log('Disconnected'),
})

// When done, unsubscribe:
unsubscribe()

API Overview

The SDK provides access to the following APIs:

  • realtime - Subscribe to live Twitch and Kick events via SSE
  • apps - Manage apps and viewer properties
  • stream - Access chat messages and events history
  • subathon - Access subathon statistics
  • viewer - Access viewer data

REST API Examples

// Get recent chat messages
const messages = await client.stream.getChatMessages({ take: 50 })

// Get recent stream events
const events = await client.stream.getEvents({ take: 20 })

// List apps
const { apps } = await client.apps.list()

// Get subathon stats
const subs = await client.subathon.getSubs()
const donations = await client.subathon.getDonations()

// Get viewer data
const viewer = await client.viewer.get({ viewerId: 'v1' })

Event Types

Twitch Events

  • channel.follow - New follower
  • channel.subscribe - New subscription
  • channel.subscription.gift - Gift subscription
  • channel.cheer - Bits cheer
  • channel.raid - Incoming raid
  • channel.channel_points_custom_reward_redemption.add - Channel point redemption
  • stream.online - Stream started
  • stream.offline - Stream ended

Kick Events

  • channel.followed - New follower
  • channel.subscription.new - New subscription
  • channel.subscription.renewal - Subscription renewal
  • channel.subscription.gifts - Gift subscriptions
  • livestream.status.updated - Stream status change

Type Imports

import type {
  // Realtime events
  RealtimeEvent,

  // Chat messages
  StreamChatMessageJson,
  TwitchChatMessageJson,
  KickChatMessageJson,

  // Stream events
  StreamEventJson,
  TwitchEventJson,
  KickEventJson,
  TwitchEventJson_Follow,
  TwitchEventJson_Subscription,
  TwitchEventJson_Cheer,
  TwitchEventJson_Raid,

  // App and viewer types
  AppJson,
  ViewerJson,
  ViewerMiniJson,
} from 'tentacle-sdk'

Building from Source

cd packages/sdk
pnpm install
pnpm build

The built SDK will be in dist/.