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

@league-bulk-buy/lcu-process-tools

v1.0.0

Published

Windows native process utilities for League of Legends client discovery (NtQueryInformationProcess, no C++ addon required)

Downloads

104

Readme

@league-bulk-buy/lcu-process-tools

Windows native process utilities for discovering the League of Legends Client (LCU) and reading its full command-line arguments — no C++ addon, no admin rights required.

How it works

Uses NtQueryInformationProcess(ProcessCommandLineInformation = 60) via koffi (a pure-JS FFI library).

Key advantage over PEB memory-reading approaches:

| Requirement | PEB approach | This package | |-------------|-------------|--------------| | PROCESS_VM_READ | ✅ Required | ❌ Not needed | | Admin / elevated | Sometimes | ❌ Never | | Works vs WeGame-elevated process | ❌ Often fails | ✅ Always works | | Native addon (.node) | Often | ❌ Pure JS FFI |

Platform: Windows x64 only (Windows 8.1 / Server 2012 R2+).

Installation

npm install @league-bulk-buy/lcu-process-tools

Requires Node.js ≥ 18 on Windows.

Usage

import { getPidsByName, getCommandLine, getProcessImagePath } from '@league-bulk-buy/lcu-process-tools';

// 1. Find all PIDs for a process name
const pids = getPidsByName('LeagueClientUx.exe');
console.log('PIDs:', pids);

// 2. Get the full command-line string (contains --remoting-auth-token, --app-port, etc.)
for (const pid of pids) {
  const cmdline = getCommandLine(pid);
  console.log(`PID ${pid} cmdline:`, cmdline);
}

// 3. Get the executable path
for (const pid of pids) {
  const imagePath = getProcessImagePath(pid);
  console.log(`PID ${pid} path:`, imagePath);
}

Parsing LCU auth info

import { getPidsByName, getCommandLine } from '@league-bulk-buy/lcu-process-tools';

function getLcuCredentials() {
  const pids = getPidsByName('LeagueClientUx.exe');
  for (const pid of pids) {
    const cmdline = getCommandLine(pid);
    if (!cmdline) continue;

    const port  = cmdline.match(/--app-port=(\d+)/)?.[1];
    const token = cmdline.match(/--remoting-auth-token=([\w-]+)/)?.[1];
    if (port && token) return { pid, port: Number(port), token };
  }
  return null;
}

API

getPidsByName(exeName: string): number[]

Returns all PIDs whose process image name matches exeName (case-insensitive).
Uses CreateToolhelp32Snapshot — no privileges required.

getCommandLine(pid: number): string | null

Returns the full command-line string for the given PID.
Uses NtQueryInformationProcess(ProcessCommandLineInformation) — only needs PROCESS_QUERY_LIMITED_INFORMATION (0x1000).
Returns null on failure.

getProcessImagePath(pid: number): string | null

Returns the full executable path for the given PID.
Uses QueryFullProcessImageNameW — only needs PROCESS_QUERY_LIMITED_INFORMATION.
Returns null on failure.

Credits

The NtQueryInformationProcess technique (class 60) is the same used by LeagueAkari's native C++ addon getCommandLine1. This package reimplements it in pure JavaScript via koffi.

License

MIT