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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@dymerz/starcitizen-ini-utils

v1.0.9

Published

A utility tool for working with Star Citizen INI localization files

Downloads

397

Readme

StarCitizen INI Utils

INI Utils - Build and Publish npm version Node.js Version License: MIT

Overview

@dymerz/starcitizen-ini-utils is a specialized utility tool designed for working with Star Citizen localization files in INI format. This tool offers commands to validate and merge INI files, making it easier to manage and maintain localization data.

Key Features

  • Validation: Check if all entries from a reference file exist in source files and verify placeholder consistency
  • Merging: Combine multiple INI files intelligently to create updated localization files
  • Placeholder Validation: Ensures that special placeholders (% and ~ format) match between reference and translated content
  • CI/CD Integration: Can be used in continuous integration workflows with the --ci flag

Prerequisites

Installation Options

Option 1: Use directly with npx (No Installation Required)

The easiest way to use this tool is directly with npx:

npx @dymerz/starcitizen-ini-utils

Option 2: Install as a project dependency

npm install @dymerz/starcitizen-ini-utils --save-dev

Option 3: Local development setup

  1. Clone the repository:
git clone https://github.com/Dymerz/StarCitizen-Localization.git
cd tools/ini-utils
  1. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. Run tests:
npm test

Usage

Command: validate

Verifies that all entries from a reference INI file are present in the source files and checks that the placeholders match properly.

npx @dymerz/starcitizen-ini-utils validate <files...> [options]

Parameters:

  • <files...>: Paths to the INI files to validate

Options:

| Option | Description | Default | |--------|-------------|---------| | --reference-type <type> | Type of reference: "github" or "local" | "github" | | --github-branch <branch> | GitHub branch to use as reference (main, ptu, etc.) | "main" | | --github-repository <repo> | GitHub repository path | "Dymerz/StarCitizen-Localization" | | --github-file-path <path> | Path to file within repository | "data/Localization/english/global.ini" | | --local-path <path> | Path to local reference file | (required when reference-type is "local") | | --ci | Run in CI mode with machine-readable output format and GitHub Actions annotations | false | | --fail-on-error | Exit with code 1 when validation errors are found | false |

CI Mode Features

When running with the --ci flag:

  • Uses machine-readable output format optimized for CI environments
  • Generates GitHub Actions compatible annotations (::error:: and ::notice::)
  • Groups output for better readability in GitHub Actions logs
  • Returns non-zero exit code (1) when validation fails
  • Provides concise error summaries at the end of execution

Examples:

# Validate against main branch on GitHub (default)
npx @dymerz/starcitizen-ini-utils validate ../../data/Localization/german_(germany)/global.ini

# Validate against PTU branch
npx @dymerz/starcitizen-ini-utils validate ../../data/Localization/german_(germany)/global.ini --github-branch ptu

# Validate against local reference file
npx @dymerz/starcitizen-ini-utils validate ../../data/Localization/german_(germany)/global.ini \
  --reference-type local --local-path ../../data/Localization/english/global.ini

# Run in CI mode with GitHub Actions annotations
npx @dymerz/starcitizen-ini-utils validate ../../data/Localization/**/global.ini \
  --reference-type local \
  --local-path ../../data/Localization/english/global.ini \
  --ci

# Run validation and exit with error code if validation fails
npx @dymerz/starcitizen-ini-utils validate ../../data/Localization/french_(france)/global.ini \
  --fail-on-error

Command: merge

Merges multiple INI files, taking values from files in order of priority, and saves the result to a new file.

npx @dymerz/starcitizen-ini-utils merge <referenceFilePath> <sourceFilePath> <replacementFilePath> <outputFilePath>

Parameters:

  • <referenceFilePath>: Path to the reference INI file (provides the structure and fallback values)
  • <sourceFilePath>: Path to the source INI file (first priority for values)
  • <replacementFilePath>: Path to the replacement INI file (second priority for values)
  • <outputFilePath>: Path to save the merged INI file

Example:

npx @dymerz/starcitizen-ini-utils merge \
  ./english/global.ini \
  ./french_old/global.ini \
  ./french_updates/global.ini \
  ./french_merged/global.ini

Technical Details

  • Written in TypeScript with strong typing
  • Creates UTF-8 files with BOM (Byte Order Mark) for proper encoding
  • Handles special characters in INI files by properly escaping semicolons and hash symbols
  • Validates both percent placeholders (%name) and tilde placeholders (~name(parameter))
  • Supports case-insensitive placeholder validation

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License


Developed and maintained by Dymerz