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

@nulz-rip/host

v0.1.0

Published

Official JavaScript/TypeScript SDK for Nulz Host. Upload images, manage folders, links, and presets programmatically.

Readme

@nulz-rip/host

Node.js SDK for Nulz Host image hosting. TypeScript, ESM, Node 18+.

Upload images, manage folders, short links, and upload presets programmatically.

Get an API key

  1. Go to https://nulz.host and sign up or log in.
  2. Open Settings and generate an API key (64-character hex).
  3. Use it in the SDK as below.

Install

npm install @nulz-rip/host

Usage

import { HostClient } from '@nulz-rip/host'

const client = new HostClient({
  apiKey: process.env.NULZ_HOST_API_KEY!,
  baseUrl: 'https://api.nulz.host', // optional; default
  timeoutMs: 60_000, // optional; uploads can be large
})

// Upload an image (Blob, File, or Node Buffer)
const file = new Blob([...]) // or fs.readFileSync(...) as Buffer, or File in browser
const result = await client.upload(file, {
  fileName: 'photo.png', // optional
  maxViews: 100,         // optional; Premium/Cyber
  expiresIn: '7d',       // optional; e.g. "30m", "24h", "7d"; Premium/Cyber
  folderId: 'folderId',  // optional
  presetId: 'presetId',  // optional
})
console.log(result.id, result.url)

// List images
const { images, total } = await client.listImages({ page: 1, limit: 25, folderId: 'root' })

// Update image (folder, maxViews, expiresIn)
await client.updateImage(result.id, { folderId: null, maxViews: 50 })

// Delete image
await client.deleteImage(result.id)

// Folders (Premium/Cyber)
const folder = await client.createFolder({ name: 'Screenshots', parentFolderId: null })
const { folders } = await client.listFolders({ parentFolderId: null })
await client.updateFolder(folder.id, { name: 'New name' })
await client.deleteFolder(folder.id)

// Short links
const link = await client.createLink({ url: 'https://example.com', slug: 'my-link' })
const { links } = await client.listLinks({ page: 1, limit: 25 })
await client.deleteLink(link.id)

// Presets (Premium/Cyber)
const preset = await client.createPreset({ name: 'Default', maxViews: 100, expiresIn: '24h' })
const { presets } = await client.listPresets()
await client.updatePreset(preset.id, { name: 'Updated' })
await client.deletePreset(preset.id)

// User & API key
const me = await client.me()
const { apiKey } = await client.apiKey.get()
await client.apiKey.create() // regenerate
await client.apiKey.revoke()

// Activity heatmap (last 365 days)
const { activity } = await client.getImageActivity()

// Config & health
const config = await client.config()
const health = await client.health()

API summary

| Method | Description | |--------|-------------| | upload(file, options?) | Upload image (Blob/File/Buffer). Options: fileName, maxViews, expiresIn, folderId, presetId. | | listImages(options?) | List images. Options: page, limit, folderId ('root' = no folder). | | getImageActivity() | Daily upload counts for heatmap. | | updateImage(id, body) | PATCH folderId, maxViews, expiresIn, expiresAt. | | deleteImage(id) | Delete image. | | replaceImage(id, file) | Replace image file (Cyber plan only). | | createFolder(body) | Create folder (name, parentFolderId?). | | listFolders(options?) | List folders. Options: parentFolderId. | | updateFolder(id, body) | PATCH name, parentFolderId. | | deleteFolder(id) | Delete folder (images move to root). | | createLink(body) | Create short link (url, slug?). | | listLinks(options?) | List links. Options: page, limit. | | deleteLink(id) | Delete link. | | createPreset(body) | Create upload preset (name, maxViews?, expiresIn?, folderId?). | | listPresets() | List presets. | | updatePreset(id, body) | PATCH name, maxViews, expiresIn, folderId. | | deletePreset(id) | Delete preset. | | me() | Current user (plan, storage, limits). | | apiKey.get() | Get current API key. | | apiKey.create() | Regenerate API key. | | apiKey.revoke() | Revoke API key. | | config() | Public config (imageBaseUrl, etc.). | | health() | Public health check. |

Errors: NulzAPIError with .message, .status, .body.

License

MIT