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

@makerkit/i18n

v0.0.1

Published

Lets coding agents read and edit JSON translation files stored as <locale>/<namespace>.json (i18next, next-i18next, next-intl with namespace files): list, update, stats, add and remove locales and namespaces.

Readme

@makerkit/i18n

Lets coding agents read and edit JSON translation files: list every key in every locale, set a value, check how much of each locale is translated, and add or remove locales and namespaces.

It works with projects that keep one folder per locale and one JSON file per namespace:

public/locales/
  en/
    common.json
    auth.json
  de/
    common.json
    auth.json

This is the layout used by i18next and next-i18next, and by next-intl projects that split messages into namespace files. A single file per locale (messages/en.json) is not supported.

Nested JSON objects are read as dot-separated keys: { "header": { "title": "Home" } } is the key header.title.

Tools

| Tool | What it does | |---|---| | translations_list | Every locale, namespace and key with its value; base_locale is the reference locale | | translations_update | Sets one key in one locale and namespace; missing parent groups are created | | translations_stats | Per-locale count of translated and missing keys, compared with the base locale | | translations_add_namespace | Creates an empty namespace file in every locale | | translations_add_locale | Creates a locale folder with an empty file for every existing namespace | | translations_remove_namespace | Deletes a namespace file from every locale | | translations_remove_locale | Deletes a locale folder and its files (the base locale cannot be removed) |

Locale and namespace names that contain path separators or .. are rejected, so the tools only touch files inside the messages directory. Keys such as __proto__ are rejected too.

Use from code

import { createTranslationsService } from '@makerkit/i18n';
import { createI18nDeps } from '@makerkit/i18n/node';

const translations = createTranslationsService(createI18nDeps(process.cwd()));

const { coverage } = await translations.stats();

await translations.update({
  locale: 'de',
  namespace: 'common',
  key: 'header.title',
  value: 'Startseite',
});

Settings

createI18nDeps(root, {
  settings: {
    messagesDir: 'apps/web/i18n/messages', // default: public/locales
    baseLocale: 'en', // default: the first locale alphabetically
    indent: 2, // default
  },
});
  • messagesDir: the folder that contains the locale folders. Absolute, or relative to the root path.
  • baseLocale: the locale that coverage is measured against and that translations_remove_locale refuses to delete. When it is not set, or that folder does not exist, the first locale in alphabetical order is used.
  • indent: indentation for written files. Files are written as JSON with a trailing newline.

Add the tools to an MCP server

Requires @modelcontextprotocol/sdk.

import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { createTranslationsService } from '@makerkit/i18n';
import { registerI18nTools } from '@makerkit/i18n/mcp';
import { createI18nDeps } from '@makerkit/i18n/node';

const server = new McpServer({ name: 'i18n', version: '1.0.0' });

registerI18nTools(
  server,
  createTranslationsService(createI18nDeps(process.cwd())),
);

Pass { prefix: 'my_' } as a third argument to prefix the tool names.

License

MIT