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

@flopsindex/sdk

v0.9.2

Published

TypeScript/JavaScript SDK for the FLOPS Index — live GPU compute pricing reference rates with verifiable provenance.

Readme

@flopsindex/sdk

npm release mirror. Source of truth: flopsindex monorepo (sdk/typescript/). Refresh with flopsindex/scripts/sync-publish.ps1, then npm run build, before publishing.

TypeScript/JavaScript SDK for the FLOPS Index — GPU compute reference rates with verifiable citations.

Zero runtime dependencies. Uses global fetch — Node ≥ 18, Deno, Bun, Cloudflare Workers, browsers. Same method names as the Python SDK so you can swap languages without relearning the API.

Monorepoflopsindex · Public access overview

Public access

This package exposes the public FLOPS index surface only: citeable reference rates with verify and permalink URLs. Index construction methodology is not published in this repository — see flopsindex.com and the public access overview.

| Access | What you get | How (this package) | |---|---|---| | Anonymous (default) | Delayed public price (~6h grid; indicative, not for settlement) for the FLOPS family (FLOPS-SPOT, FLOPS-OD, FLOPS-DEPIN). | new Client() with no API key | | Keyed | Same endpoints at real-time, full precision. | FLOPSINDEX_API_KEY or new Client({ apiKey })X-FLOPS-Api-Key | | Partner | Higher fidelity, expanded coverage, and additional detail beyond the public delayed surface. | [email protected] |

If you need more than delayed public rates — e.g. production-grade latency, broader index families, or deeper commercial terms — reach out to [email protected] to discuss partner options.

Install

npm install @flopsindex/sdk

Quick start

import { Client } from "@flopsindex/sdk";

const flops = new Client(); // optional FLOPSINDEX_API_KEY upgrades to real-time

const h100 = await flops.getPrice("FLOPS-H100-OD");
console.log(`${h100.value} ${h100.unit}`); // e.g. 2.40 USD/GPU-hr

const check = await flops.verifyHandshake("FLOPS-H100-OD", h100.value ?? 0);
if ("ok" in check && check.ok === false) {
  // upstream pending / error — your call
} else {
  // verified — cite https://app.flopsindex.com/i/FLOPS-H100-OD
}

Methods

| Method | Endpoint | Returns | |---|---|---| | getPrice(id) | /v1/price/{id} | Latest public price envelope | | search(q, limit?) | /v1/search | NL → canonical slug | | verify(id, value) | /v1/verify | Citation check (throws on error) | | verifyHandshake(id, value?) | /v1/verify | Same as verify, but returns errors instead of throwing | | listIndices() | /v2/catalog/public | Live public catalog |

Anonymous callers get the delayed public price; an API key upgrades to real-time — see Public access.

MCP hosts (Claude, Cursor, Windsurf, etc.) should use flopsindex-mcp instead of this package.

Error handling

import { FlopsNotFoundError, FlopsRateLimitError } from "@flopsindex/sdk";

try {
  await flops.getPrice("NOT-A-REAL-SLUG");
} catch (e) {
  if (e instanceof FlopsNotFoundError) { /* unknown slug */ }
  if (e instanceof FlopsRateLimitError) { /* back off e.retryAfterSeconds */ }
}

verifyHandshake never throws on HTTP errors — it returns { ok: false, reason, upstream_status } instead, matching the MCP server's defensive envelope.

Build & test

npm install
npm run build      # tsc → dist/ (ESM + .d.ts)
npm run smoke      # typed live smoke (smoke.ts, needs a TS-aware Node)
node smoke.mjs     # dependency-free live contract smoke (no build needed)

Citation

When citing a FLOPS value, include the verify URL from the response:

FLOPS Index (2026). {index_name}. https://app.flopsindex.com/i/{index_id}

License

Apache License 2.0 — see LICENSE and NOTICE.