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

@better-i18n/admin

v0.2.3

Published

Server-side admin SDK for Better i18n — manage projects, keys, translations, content, and analytics programmatically

Readme

@better-i18n/admin

Typed admin client for the Better i18n API. Use it to script the things you would otherwise click: creating projects, adding languages, importing keys, writing translations, publishing, and managing CMS content.

npm install @better-i18n/admin

Quick start

import { createAdminClient } from "@better-i18n/admin";

const admin = createAdminClient({
  apiKey: process.env.BETTER_I18N_API_KEY!,
  projectId: "acme/website", // "org/project", or a project UUID
});

await admin.languages.add({
  languages: [{ languageCode: "en-gb" }, { languageCode: "en-ca" }],
});

const { k: keys, nss: namespaces } = await admin.keys.list({ limit: 50 });

Create an API key from the Better i18n dashboard. Keys are scoped to one organization, so the project you pass has to belong to it.

Configuration

| Option | Required | Description | | --- | --- | --- | | apiKey | yes | Organization-scoped API key | | projectId | yes | "org/project" slug pair, or the project UUID | | apiUrl | no | Defaults to the hosted API | | debug | no | Log each request | | fetch | no | Supply your own fetch, e.g. in a worker runtime |

Passing a UUID costs one extra request while the client resolves it to a slug pair. Pass "org/project" when you know it.

Namespaces

| Namespace | Methods | | --- | --- | | projects | get, list | | keys | list, create, update, delete | | translations | get, set, publish, context, pendingChanges | | languages | add, update, delete | | sync | list, get, cancel | | content | entries, models, fields: list, get, create, update, publish, delete, duplicate, bulkCreate, bulkUpdate, bulkPublish, plus field add, update, remove, reorder | | analytics | views, stats |

Every method is typed from the same schemas the API validates against, so the arguments you pass and the shape you get back are checked at compile time.

Compact responses

Read endpoints answer in a compact shape. The same endpoints back the MCP servers, where short field names cut token use by roughly half, and the admin client returns them unchanged rather than maintaining a second wire format.

const res = await admin.keys.list({ limit: 50 });
// { tot, ret, pg, lim, has_more, nss, k }

for (const key of res.k) {
  console.log(res.nss[key.ns], key.k); // namespace, key name
}

nss is a namespace lookup table and key.ns indexes into it, so a namespace string is stored once per page rather than once per key. Field names are documented on each response type, and your editor will list them.

Array parameters

Parameters that take a list also accept a JSON string, because agents calling through MCP often serialize arrays that way:

await admin.languages.add({ languages: [{ languageCode: "fr" }] });
await admin.languages.add({ languages: '[{"languageCode":"fr"}]' });

Language codes

Codes are BCP 47 and stored lowercase: fr, pt-br, zh-hans, en-ca. They are normalised on the way in, so "en-CA" and "en-ca" behave the same.

Related packages

Links

MIT