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

@rsrdev/uapi

v0.1.1

Published

Bun-first TypeScript client for the cPanel UAPI.

Downloads

230

Readme

UAPI (@rsrdev/uapi)

Bun-first TypeScript client for the cPanel UAPI.

@rsrdev/uapi uses the standard fetch API, ships modern ESM for Node.js, and exposes a base client plus typed service wrappers for documented UAPI modules.

Install

bun add @rsrdev/uapi
npm install @rsrdev/uapi

Create a client

import { CpanelUapiClient } from "@rsrdev/uapi";

const client = new CpanelUapiClient({
  baseUrl: "https://host.example.com:2083",
  auth: {
    kind: "apiToken",
    username: "cpanel-user",
    token: process.env.CPANEL_UAPI_TOKEN!,
  },
});

Use the email service

const response = await client.email.createAccount({
  email: "support",
  password: "super-secret-password",
  domain: "example.com",
  quota: 1024,
});

console.log(response.result.data);

Use the domains service

const response = await client.domains.addSubdomain({
  domain: "blog",
  rootdomain: "example.com",
  dir: "public_html/blog",
});

console.log(response.result.status);

Use the FTP service

await client.ftp.addFtp({
  user: "deploy",
  pass: "super-secret-password",
  domain: "example.com",
  quota: 1024,
});

Use the MySQL service

await client.mysql.createDatabase({
  name: "appdb",
});

await client.mysql.createUser({
  name: "appuser",
  password: "super-secret-password",
});

Use the SSL service

const certs = await client.ssl.listCerts();
console.log(certs.result.data);

Use the DNS service

const zone = await client.dns.lookup({
  domain: "example.com",
});

console.log(zone.result.data);

Use the DNSSEC service

const records = await client.dnssec.fetchDsRecords({
  domain: "example.com",
});

console.log(records.result.data);

Execute any UAPI call directly

const response = await client.execute<{ user: string }>(
  "Variables",
  "get_user_information",
);

console.log(response.result.data.user);

Runtime notes

Bun applications resolve the source export directly. Node.js applications resolve the built ESM entry from dist.

Development

bun install
bun run check

Local UAPI docs mirror

bun run docs:map:uapi

This command snapshots the cPanel UAPI documentation into docs/cpanel-uapi/, including a local Markdown mirror, the upstream llms.txt, and a generated map.json index.

Domain scope

The domains service intentionally mirrors the documented UAPI surface in docs/. It supports subdomain creation, documented domain information lookups, temporary-domain operations, and domain capability checks.

Addon-domain and alias-domain creation are not included because no corresponding UAPI endpoints are present in the mirrored spec.