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

@rixl/sdk

v0.4.1

Published

Official TypeScript/JavaScript SDK for the Rixl REST API — typed client for managing images, videos, and feeds.

Readme

@rixl/sdk

Official TypeScript / JavaScript SDK for the Rixl REST API.

Published on npm as @rixl/sdk.

npm

Install

| Tool | Command | | --------- | ------------------ | | npm | npm i @rixl/sdk | | pnpm | pnpm i @rixl/sdk | | bun | bun i @rixl/sdk | | vite plus | vp i @rixl/sdk |

Requires Node.js 18+. ESM only.

Quick Start

import {createClient, getImages} from "@rixl/sdk";

const client = createClient({
  baseUrl: "https://api.rixl.com",
  auth: process.env.RIXL_API_KEY,
  responseStyle: "data",
});

const page = await getImages({
  client,
  query: {limit: 10},
});

console.log(page.data?.map((image) => image.id));

auth can be either a string or a function, so you can plug in API keys, bearer tokens, or runtime token refresh logic.

Feed API

Fetch a feed and read posts:

import {createClient, getFeedsByFeedId} from "@rixl/sdk";

const client = createClient({
  baseUrl: "https://api.rixl.com",
  auth: process.env.RIXL_API_KEY,
  responseStyle: "data",
});

const feed = await getFeedsByFeedId({
  client,
  path: {feedId: "FD4y3QB38S"},
  query: {limit: 20, offset: 0},
});

for (const post of feed.data ?? []) {
  console.log(post.id, post.type);
}

Image API

List images and fetch one by ID:

import {createClient, getImages, getImagesByImageId} from "@rixl/sdk";

const client = createClient({
  baseUrl: "https://api.rixl.com",
  auth: process.env.RIXL_API_KEY,
  responseStyle: "data",
});

const page = await getImages({
  client,
  query: {limit: 25, offset: 0},
});

const image = await getImagesByImageId({
  client,
  path: {imageId: "PS5IMKoFLm"},
});

console.log(page.data?.length, image.id, image.width, image.height);

Initialize an upload, PUT the bytes to storage, then complete the upload:

import {createClient, postImagesUploadComplete, postImagesUploadInit} from "@rixl/sdk";

const client = createClient({
  baseUrl: "https://api.rixl.com",
  auth: process.env.RIXL_API_KEY,
  responseStyle: "data",
});

const init = await postImagesUploadInit({
  client,
  body: {
    name: "photo.jpg",
    format: "jpeg",
  },
});

await fetch(init.presigned_url!, {
  method: "PUT",
  body: imageBytes,
  headers: {"Content-Type": "image/jpeg"},
});

const image = await postImagesUploadComplete({
  client,
  body: {
    image_id: init.image_id,
    attached_to_video: false,
  },
});

console.log(image.id);

Video API

List videos and fetch one by ID:

import {createClient, getVideos, getVideosByVideoId} from "@rixl/sdk";

const client = createClient({
  baseUrl: "https://api.rixl.com",
  auth: process.env.RIXL_API_KEY,
  responseStyle: "data",
});

const page = await getVideos({
  client,
  query: {limit: 25, offset: 0},
});

const video = await getVideosByVideoId({
  client,
  path: {videoId: "VI9VXQxWXQ"},
});

console.log(page.data?.length, video.id, video.duration);

Video uploads follow the same pattern, but init returns both video and poster upload URLs:

import {createClient, postVideosUploadComplete, postVideosUploadInit} from "@rixl/sdk";

const client = createClient({
  baseUrl: "https://api.rixl.com",
  auth: process.env.RIXL_API_KEY,
  responseStyle: "data",
});

const init = await postVideosUploadInit({
  client,
  body: {
    file_name: "clip.mp4",
    image_format: "jpeg",
  },
});

await Promise.all([
  fetch(init.video_presigned_url!, {
    method: "PUT",
    body: videoBytes,
    headers: {"Content-Type": "video/mp4"},
  }),
  fetch(init.poster_presigned_url!, {
    method: "PUT",
    body: posterBytes,
    headers: {"Content-Type": "image/jpeg"},
  }),
]);

const video = await postVideosUploadComplete({
  client,
  body: {
    video_id: init.video_id,
  },
});

console.log(video.id);

Development

This repository uses Vite+ as the unified toolchain and package manager wrapper, with Bun underneath.

vp install # Install dependencies
vp run pack    # Build the library
vp check   # Run formatting, linting, and type checks

Issues

github.com/rixlhq/rixl-js/issues