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

@lcpu/hpcgame-cli

v0.1.1

Published

Participant-focused CLI for submitting AOI problems

Readme

HPCGame CLI

Participant-focused command-line client for the HPCGame and AOI Online Judge Platform. It discovers the files required by an AOI problem, packages matching files from the current directory, submits them, follows judge state changes, saves the result, and prints a compact summary.

Requirements and setup

Node.js 22 or newer and pnpm are required.

Install the published package:

npm add --global @lcpu/hpcgame-cli

For local development:

corepack enable
pnpm install
pnpm build
pnpm link --global

The installed command is hpcgame.

Login

Browser/device login delegates authentication to the AOI web interface, so the browser can use IAAA without exposing PKU credentials to this CLI:

hpcgame login

The default device app ID is 77db0551-125b-4438-afd7-ecf918dec46f. A different AOI OAuth app with device flow enabled can be selected when needed:

hpcgame login --app-id OTHER-APP-UUID

Other supported methods:

hpcgame login --method mail --email [email protected]
hpcgame login --method token

Tokens are stored per server in ${XDG_CONFIG_HOME:-~/.config}/hpcgame/config.json. The directory and file are restricted to the current user. Tokens, OTPs, authorization codes, and presigned URLs are never printed.

Submit

Run the command in a directory containing every file named by the problem's form configuration:

cd my-solution
hpcgame submit \
  https://hpcgame.pku.edu.cn/org/2df8f692-0316-4682-80cd-591732b1eda6/problem/a2a1a3f1-722b-42a4-bac9-3170ce069dbb

URLs may have extra path segments, query parameters, or fragments. For example, this is also accepted:

https://hpcgame.pku.edu.cn/org/2df8f692-0316-4682-80cd-591732b1eda6/problem/a2a1a3f1-722b-42a4-bac9-3170ce069dbb/submit

The URL remains safe and unambiguous only when it contains one unique valid UUID following an org segment and one unique valid UUID following a problem segment.

The CLI:

  1. fetches the problem and prints its required paths, such as cc.cu and 1.py;
  2. validates that each path is a regular file safely contained beneath the working directory;
  3. creates the same form ZIP shape used by AOI's web client;
  4. hashes, uploads, and submits it;
  5. polls until AOI reports Completed;
  6. downloads judge details when policy permits;
  7. writes a filename-safe UTC timestamp such as result/2026-07-31T05-17-18.123Z+<solution-id>.json, containing { "solution": ..., "details": ... }.

Useful options:

-C, --cwd <directory>           read submission files from another directory
-s, --server <origin>           require the problem URL to match an origin
--poll-interval <milliseconds>  polling interval (default: 1500, minimum: 100)
--private                       prefer a private runner

Only standard, non-contest form submissions are supported. Direct file-upload and folder-upload problems are reported but not submitted automatically.

Development

pnpm check