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

@syra.fm/sdk

v0.7.0

Published

Syra SDK — headless, isomorphic catalog client (Node/React-free, public reads + 30s previews) that also ships the Syra live-rooms engine (audio rooms over LiveKit) on React Native and web.

Readme

@syra.fm/sdk

Isomorphic client for the public Syra API. The package resolves per platform via export conditions:

  • Node / bundlers (require/import) get the headless catalog client — runs on Node 18+ and browsers, no React, React Native, or DOM dependencies; the only runtime dependency is zod. Public reads only (no authentication in this version).
  • React Native (Metro) and Expo web (browser) additionally get the live-rooms engine (audio rooms over LiveKit) and the SyraIcon brand mark. Its React Native / LiveKit / Expo dependencies are declared as optional peer dependencies, so headless Node consumers never install them.

Everyone imports from the same @syra.fm/sdk root — the condition picks the right surface.

Install

bun add @syra.fm/sdk

Usage

import { createSyraClient } from '@syra.fm/sdk';

const syra = createSyraClient(); // defaults to https://api.syra.fm

// Search the catalog — returns one page; only tracks with a public preview are
// in `items`. Paginate for infinite scroll by advancing `offset` by `limit`.
const page = await syra.searchTracks('lofi beats', { limit: 10, offset: 0 });
if (page.hasMore) {
  const next = await syra.searchTracks('lofi beats', { limit: 10, offset: 10 });
}

// Fetch a single track
const track = await syra.getTrack(page.items[0].id);

// Build a public 30s preview URL (directly playable MP3)
const url = syra.previewUrl(track.id);          // .../api/preview/<id>.mp3?start=0
const hook = syra.previewUrl(track.id, 45);     // start 45s in

// Resolve artwork to an absolute URL
const cover = syra.artworkUrl(track, 'large');

Options

createSyraClient({
  baseURL: 'https://api.syra.fm', // override the API origin
  fetch,                          // inject a fetch implementation (e.g. node-fetch)
});

fetch defaults to the global fetch. It is the seam through which an authenticated transport can be layered in a future version.

API

| Method | Description | | --- | --- | | searchTracks(query, { limit, offset }) | A SearchPage<TrackSummary> of preview-available tracks ({ items, hasMore, limit, offset }). | | getTrack(id) | A single TrackSummary, schema-validated. | | previewUrl(id, startSec = 0) | Public 30s preview URL. | | artworkUrl(trackOrCoverArt, size?) | Absolute artwork URL, or undefined. | | searchPodcasts(query, { limit, offset }) | A SearchPage<PodcastSummary> of podcast shows. | | getPodcast(id) | A single PodcastSummary, schema-validated. | | podcastUrl(id) | Syra web deep link (/podcasts/:id). | | podcastArtworkUrl(show, size?) | Absolute show-artwork URL, or undefined. |

hasMore reflects the backend's pagination over the full result set, so it is not affected by the client-side preview filter on searchTracks — paginate by advancing offset by limit, never by items.length.

Responses are validated at runtime with the package's own self-contained Zod schemas (trackSummarySchema), so there are no shared internal dependencies. SyraApiError (with a status) is thrown on non-2xx responses.

Live rooms (React Native)

On React Native and Expo web, the same root export also carries the live-rooms engine — providers, hooks, components, and icons:

import {
  LiveRoomProvider,
  useRoomAudio,
  RoomCard,
  createRoomsService,
  SyraIcon,          // Syra brand mark
} from '@syra.fm/sdk';

These require the optional peer dependencies (react-native, livekit-client, @livekit/react-native, expo-audio, react-native-svg, …) — present in any Expo/React Native app, absent from headless Node consumers.