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

@nx.js/install-title

v0.0.4-beta.1

Published

Install a title from an NSP, NSZ, XCI, or XCZ file

Readme

@nx.js/install-title

Title installer for nx.js. Supports installing Nintendo Switch titles from NSP, NSZ, XCI, and XCZ files.

Usage

import { install } from '@nx.js/install-title';
import { NcmStorageId } from '@nx.js/ncm';

const file = Switch.file('sdmc:/game.nsp');

for await (const step of install(file, NcmStorageId.SdCard)) {
  switch (step.type) {
    case 'start':
      console.log(`Starting: ${step.name}`);
      break;
    case 'end':
      console.log(
        `Done: ${step.name} (${(step.timeEnd - step.timeStart).toFixed(0)}ms)`,
      );
      break;
    case 'progress':
      console.log(`${step.name}: ${step.processed}/${step.total}`);
      break;
  }
}

console.log('Installation complete!');

Supported Formats

| Format | Description | | ------ | ------------------------------------------ | | NSP | Nintendo Submission Package (PFS0) | | NSZ | Compressed NSP (contains NCZ-compressed NCAs) | | XCI | GameCard Image (HFS0 partitions) | | XCZ | Compressed XCI (contains NCZ-compressed NCAs) |

The format is auto-detected from magic bytes. You can also specify it explicitly:

for await (const step of install(file, NcmStorageId.SdCard, { format: 'xci' })) {
  // ...
}

API

install(data, storageId, options?)

Install a title from a Blob containing an NSP, NSZ, XCI, or XCZ file. The format is auto-detected from magic bytes unless options.format is specified. Yields Step progress events as the installation proceeds.

  • data — The file data as a Blob (e.g. Switch.File).
  • storageId — Target storage (e.g. NcmStorageId.SdCard).
  • options.format — Optional format hint: 'nsp', 'nsz', 'xci', or 'xcz'.
  • options.onWarning — Callback invoked when a validation warning is encountered. Return true to continue or false to abort. If not provided, warnings are treated as fatal errors.

Returns an AsyncIterable<Step>.

installNsp(data, storageId)

Convenience wrapper around install() that explicitly sets the format to 'nsp'.

Step Events

The install() generator yields progress events:

  • StepStart{ type: 'start', name, timeStart }
  • StepEnd{ type: 'end', name, timeStart, timeEnd }
  • StepProgress{ type: 'progress', name, processed, total }

Validation Warnings

The installer performs validation checks during installation and emits warnings via the onWarning callback. If no callback is provided, warnings abort the install.

for await (const step of install(file, NcmStorageId.SdCard, {
  onWarning: async (warning) => {
    console.warn(`Warning: ${warning.message}`);
    // Return true to continue, false to abort
    return true;
  },
})) {
  // ...
}

| Warning Code | Description | | --- | --- | | already-installed | The exact title ID + version is already installed (on SD or NAND) | | nca-already-registered | A specific NCA file is already registered in content storage | | missing-ticket | A .tik file is missing its corresponding .cert file |

How It Works

  1. Parse container — NSP/NSZ uses PFS0 (@tootallnate/nsp), XCI/XCZ uses HFS0 (@tootallnate/xci)
  2. Install content meta — Installs .cnmt.nca files, mounts them to read CNMT metadata
  3. Import tickets — Imports .tik and .cert files via the ES service
  4. Install NCAs — Writes NCA files to content storage via NCM placeholders. NCZ files are transparently decompressed and re-encrypted on the fly via @tootallnate/ncz
  5. Push application records — Registers the title with the NS service