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

@erlcjs/core

v2.1.0

Published

ER:LC API wrapper core, CLI, and bundled docs MCP server

Downloads

1,112

Readme

@erlcjs/core

npm version npm downloads TypeScript license

@erlcjs/core is a fully-typed TypeScript wrapper for Roblox's Emergency Response: Liberty County (ER:LC) private server API. It manages polling, webhooks, rate limits, and per-server caches so you can build moderation tools, dashboards, and bots.

Features

  • Multi-server client — manage one or many ER:LC servers from a single process.
  • Polling and webhooks — poll for full state or use the signed webhook gateway.
  • Typed events — every event callback is fully typed.
  • Automatic caching — players, vehicles, staff, calls, and logs are cached as structures.
  • Player helpers — kick, ban, jail, heal, message, teleport, and more.
  • Custom commands — register in-game ;commands with permissions and aliases.

Prerequisites

  • Node.js 20 or newer
  • A valid ER:LC private server API key

Installation

npm install @erlcjs/core
# or
pnpm add @erlcjs/core

CLI and MCP

@erlcjs/core ships the erlcjs CLI and a bundled documentation MCP server.

erlcjs version
erlcjs mcp

version prints the installed package version. mcp starts a stdio MCP server with the official erlc.js documentation baked into the package. It works offline and exposes:

  • search_docs to find guides and API pages by topic, symbol, event, or error name
  • get_doc to read a full Markdown page
  • list_docs to browse the docs by section
  • erlcjs://docs and erlcjs://docs/<slug> resources
  • an answer-from-docs prompt for agent workflows

Add the server to an MCP client:

{
  "mcpServers": {
    "erlcjs": {
      "command": "erlcjs",
      "args": ["mcp"]
    }
  }
}

If the package is not installed globally, use:

npx -y @erlcjs/core mcp

Quick Start

import { Client, ERLCEvents } from '@erlcjs/core';

const client = new Client({
    servers: ['YOUR_SERVER_API_KEY'],
    polling: { enabled: true },
});

client.on(ERLCEvents.playerJoin, (player) => {
    player.message(`Welcome to ${player.server.info?.name}!`);
});

client.on('error', console.error);

Each server key belongs to one private server. Access its managers and caches through the server:

const server = client.servers.get('YOUR_SERVER_ID')!;

server.players.cache.get(userId);
await server.commands.execute(':pm jamie hello');
await server.commands.execute(':h Server restart in 5 minutes');

Players

const player = server.players.cache.get(userId);

await player?.message('Please follow the rules.');
await player?.kick('Breaking the rules');
await player?.ban('Repeated offences');

Players also expose jail, heal, kill, wanted, respawn, load, refresh, helper, mod, admin, tp, and their un-prefixed counterparts.

Webhook Gateway

const client = new Client({
    servers: ['YOUR_SERVER_API_KEY'],
    polling: { enabled: true },
    webhook: {
        enabled: true,
        port: 3000,
        path: '/webhook',
    },
});

Webhooks are verified with ER:LC's Ed25519 signature and a timestamp tolerance. They deliver emergency-call and custom-command events; keep polling enabled for the rest.

Custom Commands

import { PlayerPermission } from '@erlcjs/core';

server.registerCommand({
    name: 'ping',
    aliases: ['p'],
    permission: [PlayerPermission.Mod],
    execute: ({ player }) => {
        player.message('pong');
    },
});

Players can then run ;ping or ;p in-game. Custom commands are delivered through the webhook gateway.

Authorization Link

For public applications, generate a link that lets server owners authorize your app:

console.log(server.authorizationLink);

Documentation

Full guides and the API reference are available at erlcjs.xyz.

License

Apache-2.0 © erlc-js contributors