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

vite-plugin-asset-manager

v0.0.6

Published

Visual asset management for Vite

Readme


Installation

npm install vite-plugin-asset-manager -D
# or
pnpm add vite-plugin-asset-manager -D
# or
yarn add vite-plugin-asset-manager -D

Usage

// vite.config.ts
import { defineConfig } from 'vite'
import AssetManager from 'vite-plugin-asset-manager'

export default defineConfig({
  plugins: [AssetManager()],
})

Start your dev server and access the Asset Manager in three ways:

  • Visit /__asset_manager__/ directly in your browser
  • Press ⌥⇧A (Option+Shift+A) to toggle the floating panel
  • Click the floating icon button injected into your app (drag to reposition)

Features

| Feature | Description | |---------|-------------| | Fully Responsive | Mobile-first design that works seamlessly from 320px to 4K+ displays | | Asset Discovery | Automatically scans and catalogs images, videos, audio, fonts, documents, and data files | | Real-time Updates | File changes reflected instantly via Server-Sent Events | | Floating Icon | Draggable & resizable overlay panel with keyboard shortcuts (⌥⇧A), snaps to all 4 edges | | Mobile Optimized | Touch-friendly UI with 44×44px tap targets, bottom sheet preview, drawer navigation | | Automatic Theming | Light/dark mode support based on system preferences | | Thumbnail Generation | Sharp-powered thumbnails with dual-tier caching | | Import Tracking | See which files import each asset with click-to-open-in-editor | | Duplicate Detection | Content-based deduplication using MD5 hashing | | Advanced Filtering | Filter by size, date modified, and file extension | | Bulk Operations | Multi-select for batch download (ZIP), copy paths, or delete | | Keyboard Navigation | Full keyboard support with vim-style bindings | | Context Menu | Right-click for quick actions (copy, reveal in Finder, delete, etc.) | | Performance | Code splitting reduces main bundle to 75 KB, lazy loading for optimal speed | | Accessibility | WCAG 2.1 Level AAA compliant with reduced motion support |

Framework Support

| Framework | Status | Notes | |-----------|--------|-------| | Vanilla | ✅ | Fully automatic | | Vue | ✅ | Fully automatic | | React | ✅ | Fully automatic | | Preact | ✅ | Fully automatic | | Lit | ✅ | Fully automatic | | Svelte | ✅ | Fully automatic | | Solid | ✅ | Fully automatic | | Qwik | ✅ | Fully automatic | | TanStack Start | ✅ | Manual setup required |

SSR Frameworks

For SSR frameworks (Next.js, Remix, Nuxt, SvelteKit, Solid Start), manual script injection is required. See the SSR Integration Guide for setup instructions.

Configuration

assetManager({
  base: '/__asset_manager__',     // Dashboard URL path
  include: ['src', 'public'],     // Directories to scan
  exclude: ['node_modules', '.git', 'dist'],
  thumbnailSize: 200,             // Thumbnail dimensions (px)
  floatingIcon: true,             // Show toggle button in host app
  watch: true,                    // Enable real-time updates
  launchEditor: 'code',           // Editor: code, cursor, webstorm, vim, etc.
})

Asset Types

| Type | Extensions | |------|------------| | Image | png jpg jpeg gif svg webp avif ico bmp tiff heic | | Video | mp4 webm ogg mov avi | | Audio | mp3 wav flac aac | | Document | pdf doc docx xls xlsx ppt pptx | | Font | woff woff2 ttf otf eot | | Data | json csv xml yml yaml toml | | Text | md txt |

Keyboard Shortcuts

| Action | Shortcut | |--------|----------| | Navigate grid | or j/k | | Focus search | / | | Close preview | Escape | | Toggle selection | Space | | Open preview | Enter | | Select all | ⌘A / Ctrl+A | | Copy paths | ⌘C / Ctrl+C | | Open in editor | ⌘O / Ctrl+O | | Reveal in Finder | ⌘⇧R / Ctrl+Shift+R | | Delete | Delete / Backspace |

API Endpoints

The plugin exposes REST endpoints at {base}/api/:

| Endpoint | Method | Description | |----------|--------|-------------| | /assets | GET | List all assets | | /assets/grouped | GET | Assets grouped by directory | | /search?q= | GET | Search by name/path | | /thumbnail?path= | GET | Get image thumbnail | | /file?path= | GET | Serve original file | | /stats | GET | Asset statistics | | /importers?path= | GET | Files importing the asset | | /duplicates?hash= | GET | Assets with matching content hash | | /open-in-editor | POST | Open file in editor | | /reveal-in-finder | POST | Reveal in system file explorer | | /bulk-download | POST | Download as ZIP | | /bulk-delete | POST | Delete multiple assets | | /events | GET | SSE stream for real-time updates |

Development

pnpm install          # Install dependencies
pnpm run build        # Build UI + plugin
pnpm run dev          # Watch mode

# Testing
pnpm run test         # Run all tests
pnpm run test:watch   # Watch mode
pnpm run test:coverage

# Playgrounds
pnpm run playground:react
pnpm run playground:vue
pnpm run playground:vanilla
pnpm run playground:preact
pnpm run playground:lit
pnpm run playground:svelte
pnpm run playground:solid
pnpm run playground:qwik

License

MIT