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

genshin-manager

v2.0.9

Published

<div align="center"> <p> <a href="https://www.npmjs.com/package/genshin-manager"><img src="https://img.shields.io/npm/v/genshin-manager.svg?maxAge=3600" alt="npm version" /></a> <a href="https://www.npmjs.com/package/genshin-manager"><img src="https:

Downloads

679

Readme

Genshin Manager

Overview

A comprehensive Node.js library for accessing Genshin Impact game data through Enka.Network API and official data sources. Build powerful applications with complete character showcases, weapon stats, artifacts, materials, and real-time player data.

Note: This is a third-party library and not affiliated with Enka.Network or miHoYo.

✨ Key Features

  • 🎮 Complete Game Data Access - Characters, weapons, artifacts, materials, monsters, and more
  • 🔄 Real-time Player Data - Fetch showcases from Enka.Network with caching
  • 🌐 Multi-language Support - 13 languages including EN, JP, CN, KR, and more
  • 🗄️ Intelligent Caching - Automatic asset management with scheduled updates
  • 📱 Game Notices - Official announcements and events
  • 🎨 Rich Media Assets - Character portraits, weapon icons, artifact images
  • 🛡️ Type-Safe - Full TypeScript support with comprehensive type definitions
  • Performance Optimized - Smart caching and efficient data structures

Installation

System Requirements

  • Node.js 18 or newer
  • Internet connection for initial setup

Basic Installation

npm install genshin-manager

Supported Languages

EN, RU, VI, TH, PT, KR, JP, ID, FR, ES, DE, CHT, CHS

Quick Start

Basic Setup

const { Client } = require('genshin-manager')

// Initialize the client
const client = new Client()
await client.deploy()

console.log('Genshin Manager is ready!')

Fetch Player Data from Enka.Network

const { Client, EnkaManager } = require('genshin-manager')

const client = new Client()
await client.deploy()

const enkaManager = new EnkaManager()
const playerData = await enkaManager.fetchAll(800802278) // Replace with valid UID

console.log(`Player: ${playerData.playerDetail.nickname}`)
console.log(`Level: ${playerData.playerDetail.level}`)
console.log(`Characters: ${playerData.characterDetails.length}`)

Access Character Information

const { Client, CharacterInfo } = require('genshin-manager')

const client = new Client({ defaultLanguage: 'EN' })
await client.deploy()

// Get character by ID
const ayaka = new CharacterInfo(10000002) // Kamisato Ayaka
console.log(ayaka.name)      // "Kamisato Ayaka"
console.log(ayaka.element)   // "Cryo"
console.log(ayaka.rarity)    // 5

// Search by name
const zhongliIds = CharacterInfo.getCharacterIdByName("Zhongli")
const zhongli = new CharacterInfo(zhongliIds[0])

Access Weapon Information

const { Client, Weapon } = require('genshin-manager')

const client = new Client({ defaultLanguage: 'EN' })
await client.deploy()

// Create weapon instance
const weapon = new Weapon(13501, 90, true, 5) // Staff of Homa, Level 90, Ascended, R5
console.log(weapon.name)           // "Staff of Homa"
console.log(weapon.stats)          // Array of weapon stats
console.log(weapon.skillName)      // "Reckless Cinnabar"

Advanced Configuration

Multi-language Support

const { Client, CharacterInfo } = require('genshin-manager')

const client = new Client({
  defaultLanguage: 'EN',
  downloadLanguages: ['EN', 'JP', 'KR']
})
await client.deploy()

const hutao = new CharacterInfo(10000046)
console.log(hutao.name) // "Hu Tao"

// Switch language dynamically
await client.changeLanguage('JP')
console.log(hutao.name) // "胡桃"

Custom Cache Configuration

const { Client } = require('genshin-manager')

const client = new Client({
  assetCacheFolderPath: './my-cache',
  autoFetchLatestAssetsByCron: '0 2 * * 1', // Update every Monday at 2 AM
  autoCacheImage: true,
  showFetchCacheLog: true
})
await client.deploy()

Event Handling

const { Client, ClientEvents, EnkaManagerEvents } = require('genshin-manager')

const client = new Client()

// Listen for cache updates
client.on(ClientEvents.BEGIN_UPDATE_CACHE, (version) => {
  console.log(`Updating cache for game version: ${version}`)
})

client.on(ClientEvents.END_UPDATE_CACHE, (version) => {
  console.log(`Cache updated successfully for version: ${version}`)
})

await client.deploy()

Asset Management

Game Data Cache

Game data is sourced from Dimbreath/AnimeGameData and includes:

  • Character data and stats
  • Weapon information and refinements
  • Artifact sets and properties
  • Material data
  • Monster information
  • Localized text in 13 languages

Automatic Updates

const { Client } = require('genshin-manager')

const client = new Client({
  // Auto-update every Wednesday at midnight (default)
  autoFetchLatestAssetsByCron: '0 0 0 * * 3',

  // Auto-fix corrupted files
  autoFixTextMap: true,
  autoFixExcelBin: true,

  // Cache images and audio
  autoCacheImage: true,
  autoCacheAudio: true
})
await client.deploy()

Manual Cache Updates

const { Client } = require('genshin-manager')

const client = new Client({ showFetchCacheLog: true })
await client.deploy() // This will update the cache if new data is available

Game Notices and Announcements

const { Client, NoticeManager, NoticeManagerEvents } = require('genshin-manager')

const client = new Client()
await client.deploy()

const noticeManager = new NoticeManager('en', 300000) // English, update every 5 minutes

// Listen for new notices
noticeManager.on(NoticeManagerEvents.ADD_NOTICE, (notice) => {
  console.log(`New notice: ${notice.title}`)
})

await noticeManager.update()

// Access notices
noticeManager.notices.forEach((notice) => {
  console.log(`${notice.title} - ${notice.eventDuration}`)
})

Examples and Documentation

More Examples

Check out the examples directory for:

  • Character showcase applications
  • Weapon comparison tools
  • Notice monitoring systems
  • Multi-language implementations

Full Documentation

📖 Complete API Documentation

Handbooks

The library includes comprehensive handbooks for each supported language:

  • Character IDs and names
  • Skill information
  • Constellation data
  • And more game entities

API Reference

Core Classes

| Class | Description | |-------|-------------| | Client | Main entry point for the library | | EnkaManager | Handles Enka.Network API interactions | | NoticeManager | Manages game announcements | | CharacterInfo | Character data and information | | Weapon | Weapon stats and properties | | Artifact | Artifact data and set bonuses | | Material | Game materials and items | | Monster | Enemy data and stats |

Data Sources

  • Enka.Network API: Real-time player and character data
  • Dimbreath/AnimeGameData: Comprehensive game data repository
  • Official API: Official game announcements and notices
  • Asset Servers: Character images, weapon icons, and audio files

Requirements

  • Node.js: Version 18.0.0 or higher
  • Platform: Cross-platform (Windows, macOS, Linux)
  • Internet: Required for initial setup and API requests

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please read the contributing guidelines and submit pull requests to help improve the library.

Changelog

View the release history and changelog for detailed information about updates and new features.

Support