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

@hotrepl/sdk

v4.1.0

Published

Canonical TypeScript SDK for HotRepl v2 runtimes.

Readme

@hotrepl/sdk

This TypeScript SDK connects scripts and applications to a running Unity game through HotRepl. Use it to evaluate C#, call game commands and read exported artifacts without implementing the WebSocket protocol yourself.

npm package · Website

Setup

You need a JavaScript runtime with WebSocket support and a game running a HotRepl host. The host supports BepInEx or Lunaris on Mono and MelonLoader on IL2CPP. Follow the game setup instructions before connecting.

npm install @hotrepl/sdk

Inspect and automate a game

import { connect } from "@hotrepl/sdk";

const session = await connect();
try {
  const product = await session.eval<string>("UnityEngine.Application.productName");
  console.log(product.value);
  const app = await session.run("unity.app.info", {});
  console.log(app.output);
} finally {
  session.close();
}

Use session.eval() for C# exploration and session.run() for registered, schema-validated commands. Close the session when your script or service finishes so its WebSocket does not keep the process running.

Choose an endpoint

Pass an endpoint directly with connect({ url: "ws://127.0.0.1:18591" }). To read HOTREPL_URL from a Node or Bun process, supply its environment explicitly:

const session = await connect({ env: process.env });

connect() does not read process environment variables on its own. An explicit url takes precedence over env.HOTREPL_URL. The connection implementation defines the fallback endpoint and supported options, including artifact path mapping.

To give up on a host that does not answer, pass an AbortSignal as connect({ signal }). Cancellation covers the wait for the handshake, closes the pending transport and rejects with the signal's reason. Once connect() resolves, the signal no longer affects the session, so call session.close() when you finish.

Runtime access and artifacts

Evaluation and commands execute with the game's permissions and can change state or write files. Only send code and commands you trust, and keep the game host on loopback because the protocol has no authentication. Connecting another client replaces your session.

Command results include artifact references. Use session.artifact(ref) for an existing reference, or read artifacts from a command result, to access files and verify their hashes. The protocol reference explains file lifetime and path mapping under Wine or Proton.

Reference and development

  • Session API defines evaluation, command calls, watches, journal queries and notifications.
  • Command authoring explains how to expose your own game commands.
  • AGENTS.md covers development setup and targeted SDK checks.
  • CLI and MCP server provide shell and coding-agent clients.

License

MIT.