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

@chirag127/ai

v0.1.0

Published

Framework-agnostic AI client, one interface, two backends. Server: NVIDIA NIM (OpenAI-compatible, key from env NVIDIA_API_KEY, server-side only). Client: Puter.js (keyless, user-auths, :free models). Shared chat(messages, opts) contract.

Readme

@chirag127/ai

One AI interface, two backends. Same chat(messages, opts) -> Promise<string> contract both sides.

  • ./server — NVIDIA NIM (OpenAI-compatible). Key-safe: reads NVIDIA_API_KEY from env. Server-side only, never ship to client.
  • ./client — Puter.js. Keyless: users auth via Puter, no key leaves the browser. :free models only.

Framework-agnostic, zero deps.

Install

npm i @chirag127/ai

Server — NVIDIA NIM (key-safe)

Key from env NVIDIA_API_KEY (GH Secret). Never embedded, never sent to a browser. Tries 3 models in order.

import { chat } from '@chirag127/ai/server';

// NVIDIA_API_KEY in env (or pass opts.apiKey)
const reply = await chat([{ role: 'user', content: 'Explain HMAC in one line.' }]);
console.log(reply);

// pick a model (still falls back through the rest on error)
await chat('hi', { model: 'meta/llama-3.3-70b-instruct' });

Throws if NVIDIA_API_KEY is missing. Models tried in order: nvidia/llama-3.3-nemotron-super-49b-v1meta/llama-3.3-70b-instructdeepseek-ai/deepseek-r1.

Client — Puter.js (keyless)

Loads js.puter.com/v2 on first call. No key anywhere; the user authorizes via Puter.

import { chat, listFreeModels } from '@chirag127/ai/client';

const reply = await chat('Write a haiku about caching.');
console.log(reply);

// live :free catalog
console.log(await listFreeModels());

:free models tried in order: nvidia/nemotron-3-super-120b-a12b:freeopenai/gpt-oss-20b:freegoogle/gemma-4-31b-it:free.

Shared

import { MODELS, toMessages } from '@chirag127/ai';
MODELS.server; // string[]
MODELS.client; // string[] (:free)

Both backends accept a string prompt or a messages array ({ role, content }[]).

License

MIT