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

@ohm_studio/sdk

v0.12.0

Published

OHM Studio SDK for JavaScript / TypeScript / React. Voice-to-structured-JSON clinical extraction APIs.

Readme

OHM SDK · @ohm_studio/sdk

The short name is OHM SDK. The full npm name is @ohm_studio/sdk — that's what you install. Both names refer to the same package.

OHM Studio SDK for JavaScript / TypeScript / React — turn voice into structured clinical JSON, FHIR-ready, multi-language. Works in the browser, Node 18+, and Next.js (server actions, route handlers, edge runtime).

For React Native, install @ohm_studio/sdk-react-native (OHM RN SDK) instead.

Install

npm install @ohm_studio/sdk
# or
pnpm add @ohm_studio/sdk
# or
yarn add @ohm_studio/sdk

Quickstart

import { OHM } from "@ohm_studio/sdk";

// OHM is hospital-deployed. Each hospital exposes its own API URL
// (e.g. `api.<hospital>.example`). Set `baseUrl` to the URL of the
// hospital you're integrating with — your hospital admin gives you this.
// `https://api.ohm.doctor` is just OHM's own demo hospital and has no
// special status.
const ohm = new OHM({
  apiKey: process.env.OHM_API_KEY!,           // ohms_live_* or ohms_test_*
  baseUrl: process.env.OHM_API_URL!,          // e.g. https://api.kauvery.example
});

// Text → structured JSON
const { data } = await ohm.extract({
  apiSlug: "opd-clinic",
  text: transcript,
});

// Audio → structured JSON in one call
// `transcript` is always English — Tamil, Hindi, Telugu, Bengali, or any
// code-mixed consult is translated server-side before extraction runs.
const { transcript, data } = await ohm.audio.extract({
  apiSlug: "opd-clinic",
  file: blob,                                 // File / Blob / { buffer, name?, type? }
});

// Summarize free text — patient / handover / executive / progress-note
const { summary } = await ohm.summarize({
  text: longConsult,
  style: "patient",
  maxLines: 5,
});

React hooks

import { OHM } from "@ohm_studio/sdk";
import { OhmProvider, useOhmAudioExtract } from "@ohm_studio/sdk/react";

const ohm = new OHM({ apiKey: process.env.NEXT_PUBLIC_OHM_TEST_KEY });

export default function App({ children }) {
  return <OhmProvider client={ohm}>{children}</OhmProvider>;
}

function Recorder() {
  const { mutateAsync, data, isPending, error } = useOhmAudioExtract({
    apiSlug: "opd-clinic",
  });
  // ...
}

Cancellation, upload progress, and discovery (v0.6+)

Every method now accepts a signal?: AbortSignal. audio.transcribe and audio.extract accept an onProgress callback. ohm.apis.list() enumerates published Studio APIs.

const controller = new AbortController();

const { data } = await ohm.audio.extract({
  apiSlug: "opd-clinic",
  file: blob,
  signal: controller.signal,                    // user clicks Cancel → controller.abort()
  onProgress: ({ percent }) => setUploadPct(percent),
});

const apis = await ohm.apis.list();             // [{ slug, name, status, version }]

The React hooks (useOhmExtract, useOhmAudioExtract, useOhmSummarize, useRecorder) auto-abort on unmount and on the next mutation, so navigating away mid-upload never debits a half-finished call. Aborts surface as OHMAbortError (code: "aborted") — pattern match to ignore them.

Error handling

import {
  OHMAuthError,
  OHMRateLimitError,
  OHMValidationError,
  OHMAbortError,
} from "@ohm_studio/sdk";

try {
  await ohm.extract({ apiSlug: "opd", text });
} catch (e) {
  if (e instanceof OHMAbortError)       return;        // user cancelled
  if (e instanceof OHMRateLimitError)   await sleep(e.retryAfterSec! * 1000);
  if (e instanceof OHMAuthError)        rotateKey();
  if (e instanceof OHMValidationError)  showFieldErrors(e.fields);
}

Typed data with the Studio CLI

Pair this SDK with @ohm_studio/cli to generate TypeScript interfaces from your published Studio API schemas:

npm install -D @ohm_studio/cli
npx ohm-studio pull-all --out src/ohm
import type { OpdClinicData } from "./ohm/opd-clinic";

const { data } = await ohm.extract<OpdClinicData>({
  apiSlug: "opd-clinic",
  text: transcript,
});
// `data` is typed against your Studio schema

Bundle size

@ohm_studio/sdk core ships < 25 KB gzipped. React hooks subentry adds ~3 KB. Zero polyfills for Node 18+ / modern browsers.

Documentation

Full reference, cookbook, and OpenAPI playground: docs.ohm.doctor

License

MIT