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

@iconical/presencekit

v0.1.0

Published

Opt-in Discord presence with REST and live updates for JavaScript, React, Vue and Svelte

Readme

PresenceKit SDK

PresenceKit

Bring your Discord presence to your website.

PresenceKit is a lightweight TypeScript SDK for displaying real-time Discord status, games, activities, Spotify listening information, and more.

Built for JavaScript, TypeScript, React, Next.js, Vue, Svelte, and other modern web applications.

  • Real-time updates — Live presence through Server-Sent Events (SSE), with automatic polling fallback.
  • Rich activities — Display games, applications, Spotify tracks, and activity details.
  • Smart artwork — Automatically resolve activity artwork, with graceful image fallbacks.
  • Framework-friendly — Typed APIs, React hooks, reusable components, and framework integrations.
  • Privacy-first — Only share presence information from users who have explicitly opted in.
  • No Discord credentials required — Connect directly through PresenceKit's public API.

Installation

Option 1 — Install from npm (recommended)

The easiest way to get started is to install the official package using your preferred package manager.

npm

npm install @iconical/presencekit

pnpm

pnpm add @iconical/presencekit

Bun

bun add @iconical/presencekit

Yarn

yarn add @iconical/presencekit

Once installed, you're ready to integrate PresenceKit into your application.

Option 2 — Build manually from source

Prefer working directly with the source code? You can clone the repository, build the SDK, and install the generated package locally.

git clone https://github.com/himinthevoid/presencekit.git
cd presencekit
bun install
bun run build

Create a local npm package archive:

bun pm pack --filename presencekit-local.tgz

Then install the generated archive into your own project:

npm install /path/to/presencekit-local.tgz

This is useful for local development, testing unreleased features, or contributing to PresenceKit.

For more information, see the installation guide.

Quick start

Retrieve a Discord user's current presence:

import { createPresenceClient } from "@iconical/presencekit";

const client = createPresenceClient();

const result = await client.getPresence("123456789012345678");

console.log(result.profile.displayName);
console.log(result.presence?.status);
console.log(result.presence?.activities);

Replace the example ID with the Discord ID of a user who has enabled PresenceKit sharing.

React / Next.js

PresenceKit includes React hooks that manage live subscriptions, updates, and connection cleanup automatically.

"use client";

import { usePresence } from "@iconical/presencekit/react";

export default function DiscordPresence() {
  const { data, loading, error } = usePresence({
    userId: "123456789012345678",
  });

  if (loading) return <p>Connecting...</p>;
  if (error || !data?.presence) {
    return <p>Presence unavailable</p>;
  }

  return (
    <div>
      <h3>{data.profile.displayName}</h3>
      <p>Status: {data.presence.status}</p>
    </div>
  );
}

Looking for ready-made components? PresenceKit also provides reusable React UI components:

import { LivePresenceCard } from "@iconical/presencekit/react-ui";

<LivePresenceCard userId="123456789012345678" />;

Explore the framework guides for more examples.

How presence sharing works

PresenceKit is an opt-in service. Users decide whether their Discord presence can be shared through the public API.

To enable sharing, join the official PresenceKit Discord community and use the /confirm command.

To revoke access, use /disconnect.

Applications never need to request Discord account credentials or store Discord authentication tokens to read authorized presence data.

Documentation

Find detailed explanations, tutorials, API references, and examples in the official documentation.

API endpoint: https://presence-api.iconical.dev

The endpoint is configured automatically by the SDK.

Development

Want to contribute or work on the SDK locally?

bun install
bun test
bunx tsc --noEmit
bun run build

For additional checks:

bun run check:release
bun run check:boundary
bun run check:contract

See CONTRIBUTING.md for contribution guidelines and the changelog for project updates.

License

PresenceKit is distributed under the PresenceKit Source-Available License v1.0.

Personal and commercial application usage, contributions, and modifications are permitted under the license's terms. Redistribution of unchanged or lightly modified standalone copies is restricted.

PresenceKit is source-available software, not OSI-approved open source.


Built with ❤️ by Iconical.