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

theorim-sdk

v2.1.0

Published

Theorim client SDK for browser and Node.js

Readme

theorim-sdk

Client SDK for the Theorim API. Works in browsers (classic <script> tag) and in Node.js / bundler environments via require or import.

Browser (classic script)

<script src="/js/theorim-sdk/theorim.js"></script>
<script>
    // Auto-instantiated as window.Theorim, with a same-origin baseUrl
    Theorim.api({ command: 'user_get_def', method: 'GET' });
</script>

When loaded in a browser, the SDK exposes:

  • TheorimClient — the class
  • window.Theorim — a default instance pointed at the same origin

Node.js / bundlers

CommonJS:

const TheorimClient = require('theorim-sdk');
const client = new TheorimClient('https://api.example.com');
await client.api({ command: 'user_get_def', method: 'GET' });

ESM:

import TheorimClient from 'theorim-sdk';
const client = new TheorimClient('https://api.example.com');

Node 18+ provides global fetch. The web-worker / WebSocket features (get_def, get_table, mcp) are browser-only and will not initialize when window is undefined.

CLI

Installing the package globally (or via npx) registers a theorim command:

theorim add-profile https://example.com theorim_mykey_abc123
theorim list-profiles
theorim switch-profile https://example.com
theorim list-routes
theorim some_command --foo bar --count 3
  • Profiles are stored at ~/.theorim/profiles.json (file mode 0600).
  • The first profile registered becomes the active profile automatically.
  • Any command that isn't built in is forwarded to the active profile as GET /api/<command> with --key value flags becoming the query payload.
  • The x-api-key header is set from the active profile's API key.

Run theorim with no arguments to see the list of built-in commands.

Files

  • theorim.js — main entry, defines TheorimClient
  • cli.js — Node CLI entry point (theorim bin)
  • Worker.js — browser-only web worker for streaming dataset reads