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

@cliff-studio/sanity-plugin-bunny-input

v1.0.9

Published

Sanity Studio plugin for uploading videos to Bunny Stream

Downloads

50

Readme

@cliffstudio/sanity-plugin-bunny-input

A Sanity Studio plugin for uploading and managing videos via Bunny Stream.

Features

  • Drag & drop video uploads directly in Sanity Studio
  • Upload progress indicator
  • Automatic status polling (uploading → processing → ready)
  • Thumbnail preview when video is ready
  • Video deletion support

Installation

From GitHub (private repo)

npm install github:cliffstudio/sanity-plugin-bunny-input

Or add to your package.json:

{
  "dependencies": {
    "@cliffstudio/sanity-plugin-bunny-input": "github:cliffstudio/sanity-plugin-bunny-input"
  }
}

From npm (if published)

npm install @cliffstudio/sanity-plugin-bunny-input

Setup

1. Get your Bunny Stream credentials

  1. Log in to bunny.net
  2. Go to Stream → Create or select a Video Library
  3. Find your Library ID (numeric ID in the URL or settings)
  4. Go to API section to find your Stream API Key

2. Add the plugin to your Sanity config

// sanity.config.ts
import {defineConfig} from 'sanity'
import {bunnyInput} from '@cliffstudio/sanity-plugin-bunny-input'

export default defineConfig({
  // ... other config
  plugins: [
    bunnyInput({
      libraryId: process.env.SANITY_STUDIO_BUNNY_LIBRARY_ID,
      // Optional: auto-create/use this Bunny Stream collection (folder) for uploads
      collectionName: process.env.SANITY_STUDIO_BUNNY_COLLECTION_NAME,
      // Optional alternative: hardcode an existing collection GUID
      // collectionId: process.env.SANITY_STUDIO_BUNNY_COLLECTION_ID,
      apiKey: process.env.SANITY_STUDIO_BUNNY_API_KEY,
    }),
  ],
})

3. Configure environment variables

For Sanity Studio (.env)

SANITY_STUDIO_BUNNY_LIBRARY_ID=your-library-id
SANITY_STUDIO_BUNNY_COLLECTION_NAME=my-project-videos
# Optional alternative:
# SANITY_STUDIO_BUNNY_COLLECTION_ID=existing-collection-guid
SANITY_STUDIO_BUNNY_API_KEY=your-api-key

4. Use in your schemas

import {defineField, defineType} from 'sanity'

export default defineType({
  name: 'myDocument',
  type: 'document',
  fields: [
    defineField({
      name: 'video',
      title: 'Video',
      type: 'bunnyVideo',
    }),
  ],
})

Collections (folders)

You can route uploads into a Bunny Stream collection (folder):

  • Set collectionId to use an existing collection GUID directly.
  • Or set collectionName to auto-create/use a collection by name.
  • If you use collectionName, the plugin will look up/create that collection before upload.

collectionId takes precedence if both are provided.

Schema

The bunnyVideo type stores:

{
  _type: 'bunnyVideo',
  videoId: string,      // Bunny's GUID
  libraryId: string,    // Your library ID
  collectionId?: string,   // Bunny collection GUID (if configured)
  collectionName?: string, // Bunny collection name (if configured)
  title: string,        // Video title
  status: 'uploading' | 'processing' | 'ready' | 'error',
  thumbnailUrl: string, // Auto-generated thumbnail
  playbackUrl: string,  // HLS playlist URL
  mp4Url: string,       // Direct MP4 URL
  duration: number,     // Duration in seconds
}

License

MIT