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

@ohmygame/sketchfab

v0.1.0

Published

Search Sketchfab from the Library: downloadable 3D models under CC0, CC BY and CC BY-SA.

Readme

Sketchfab Beta

A Library source for Sketchfab: downloadable 3D models under licenses that allow commercial use and changes. Requires OhMyGame plugin API 2.35+ (collections, the one-hour cache, the Settings status and the interactive preview).

Use

Turn the plugin on under Plugins. It adds a Sketchfab tab to the Library page with ten collections: All first, then Sketchfab's categories Characters, Animals, Vehicles, Weapons, Nature, Buildings, Furniture, Food and Tech. A browse shows the most liked models first; a search, the best matches within the chosen collection. Scrolling loads the next page.

A model's details offer Load interactive preview: Sketchfab's own 3D viewer, inside the Library, where you can turn and zoom the model and play its animations before adding it. Nothing is asked of Sketchfab until you choose it. The viewer is https://sketchfab.com/models/<uid>/embed with dnt=1, which asks Sketchfab not to track it; OhMyGame shows it only because the plugin lists sketchfab.com in capabilities.network (shown when you allow the plugin), sandboxes it and keeps it on sketchfab.com. Open source page opens the model's page in your browser.

Browsing, searching and thumbnails need no account. Adding a model downloads its GLB file, which Sketchfab allows only to a signed-in person: until you sign in, adding says so and points to this plugin's Settings. An added model keeps its author, license and Sketchfab page, shown in its details.

Licenses

Each page asks Sketchfab for downloadable models under CC0, CC BY and CC BY-SA (Sketchfab searches one license at a time, so a page holds up to 8 of each, in turn). These allow commercial use and changes; NonCommercial (NC) and NoDerivatives (ND) models, and Sketchfab Store models, are never listed or added. Adding a model reads its license again from Sketchfab and refuses one outside these three, so an agent's library_use can't add one either.

  • CC BY: credit the author shown with the model where you use it.
  • CC BY-SA: credit the author, and share changed versions of the model under CC BY-SA.
  • CC0: no credit needed.

Sketchfab reports each license from what its author chose; check the model's page before relying on it. Age-restricted models, and models whose GLB is over the Library's 200 MB, are left out.

Signing in

The plugin's Settings tab shows who is signed in and how:

  • Sign in with Sketchfab (OAuth): opens Sketchfab's sign-in page in your browser. After you choose Allow, Sketchfab returns to http://127.0.0.1:52817/sketchfab/callback on this computer, which the plugin listens on only while a sign-in is waiting (ten minutes at most). It checks the state it started with (another page's visit leaves the sign-in waiting), exchanges the code at /oauth2/token/ with the client ID alone, asks Sketchfab's /v3/me who it is, and keeps the access and refresh tokens in account.json in its data folder, readable only by you. Access tokens last a month; when one has ended, or Sketchfab refuses it, adding a model renews it with the refresh token first. A refresh token Sketchfab refuses ends the sign-in. Sign out deletes it.

    Sketchfab sets up desktop apps as public clients of the authorization-code grant, without a client secret; it doesn't offer the implicit grant, PKCE or custom URL schemes. Sign-in needs OhMyGame's application (CLIENT_ID in native/index.mjs, with the redirect URI above), which Sketchfab registers on request through its Help Center (Developers & API › API and OAuth). Until it is set, the button isn't offered. For development, start OhMyGame with OHMYGAME_SKETCHFAB_CLIENT_ID set to an application's client ID.

  • Sketchfab API token: paste the token from Sketchfab's Settings › Password & API (Get API token opens it). It is saved as a secret on this computer and sent only to Sketchfab; turning the plugin on allows it to read it (capabilities.secrets). Sign out clears it too.

When both are there, the OAuth sign-in is used while it lasts or can be renewed. A token Sketchfab refuses is reported when adding, and an OAuth sign-in that can't be renewed is forgotten.

How it works

native/index.mjs asks GET /v3/search?type=models&downloadable=true once per license, with the collection's categories, and merges the three pages; its cursor carries Sketchfab's cursor for each license. Searches need no account. Adding a model asks GET /v3/models/{uid} (license, author, downloadable), then GET /v3/models/{uid}/download with your sign-in, and downloads the signed glb address it returns, without your credentials. The download is refused past 200 MB or when its first bytes aren't glTF.

The manifest's cacheSeconds: 3600 asks OhMyGame to show a browse of a collection, without search words, again for an hour before asking Sketchfab; searches with words, and Refresh, always ask. timeoutSeconds: 600 gives large downloads time.

Local acceptance

  • Add the folder under Plugins › Add plugin › This computer with Develop on, turn it on and open the Library: the tab opens on All. Open a model with animations and choose Load interactive preview: Sketchfab's viewer turns, zooms and plays them. Switch collections, search sword, scroll to load more, and check only CC0, CC BY and CC BY-SA show, without signing in.
  • Add a model while signed out: it says to sign in in this plugin's Settings.
  • Settings: Get API token opens Sketchfab's page; paste the token, and the status says whose it is. Add a model and check it opens as GLB with its author, license and page. A wrong token says Sketchfab didn't accept it.
  • With OHMYGAME_SKETCHFAB_CLIENT_ID set: Sign in with Sketchfab, allow, and the browser says you're signed in and the status says who; Cancel sign-in stops waiting; Sign out returns to signed out. Denying on Sketchfab's page says you didn't allow OhMyGame.