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

@gunshi/resources

v0.29.2

Published

built-in localization resources for gunshi

Readme

@gunshi/resources

built-in localization resources for gunshi.

This package provides multilingual resources for gunshi.

💿 Installation

# npm
npm install --save @gunshi/resources

# pnpm
pnpm add @gunshi/resources

# yarn
yarn add @gunshi/resources

# deno
deno add jsr:@gunshi/resources

# bun
bun add @gunshi/resources

🚀 Usage

Import all locales

import resources from '@gunshi/resources'

console.log(resources['en-US']) // display en-US reousrces
console.log(resources['ja-JP']) // display ja-JP resources

Import specific locale

You can import via sub paths.

// English resources
import enUS from '@gunshi/resources/en-US' with { type: 'json' }

// Japanese resources
import jaJP from '@gunshi/resources/ja-JP' with { type: 'json' }

✨ Built-in Keys

Keys for built-in functionalities are handled by Gunshi's default locales. The complete list includes:

  • USAGE - Usage section header
  • OPTIONS - Options section header
  • ARGUMENTS - Arguments section header
  • COMMANDS - Commands section header
  • EXAMPLES - Examples section header
  • FORMORE - Footer text for additional help
  • NEGATABLE - Prefix for negatable options (e.g., "Negatable of --verbose")
  • DEFAULT - Prefix for default values (e.g., "default: 5")
  • CHOICES - Prefix for available choices (e.g., "choices: red, green, blue")
  • help - Description for the help option ("Display this help message")
  • version - Description for the version option ("Display this version") The following keys are provided for each locale:

🌍 Supported Locales

  • en-US - English (United States)
  • ja-JP - Japanese (Japan)

🧩 Usage in i18n plugin

This package is internally used by gunshi plugins, particularly @gunshi/plugin-i18n and @gunshi/plugin-renderer.

Example with @gunshi/plugin-i18n

import i18n from '@gunshi/plugin-i18n'
import resources from '@gunshi/resources'
import { cli } from 'gunshi'

await cli(
  args,
  {
    /* your entry command */
  },
  {
    plugins: [
      i18n({
        locale: 'ja-JP',
        builtinResources: resources // Use @gunshi/resources directly
      })
    ]
  }
)

Integration with Custom Resources

import resources from '@gunshi/resources'

// Extend built-in resources
const customResources = {
  'en-US': {
    ...resources['en-US'],
    // Add custom keys
    MY_CUSTOM_KEY: 'My custom message'
  },
  'ja-JP': {
    ...resources['ja-JP'],
    // Add custom keys
    MY_CUSTOM_KEY: '私のカスタムメッセージ'
  }
}

©️ License

MIT