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

code-grader

v0.0.0

Published

CLI tool for LLM-based code grading

Readme

code-grader

CLI tool for LLM-based code grading using Google's Generative AI.

Installation

pnpm install
pnpm build

Usage

Basic Usage

Grade a single submission:

code-grader --policy ./grading-policy --submissions ./submission1

Multiple Submissions

Grade multiple submissions at once:

code-grader --policy ./grading-policy --submissions ./submission1 ./submission2 ./submission3

Export to JSON

Save results to a JSON file:

code-grader --policy ./grading-policy --submissions ./submission1 ./submission2 --output results.json

Export to JSONL

Save results to a JSONL file (one JSON object per line):

code-grader --policy ./grading-policy --submissions ./submission1 ./submission2 --output results.jsonl

Output to stdout

Output JSON to stdout:

code-grader --policy ./grading-policy --submissions ./submission1 --json

Output CSV to stdout:

code-grader --policy ./grading-policy --submissions ./submission1 --csv

Custom Model

Use a different model:

code-grader --policy ./grading-policy --submissions ./submission1 --model gemini-1.5-pro

High Concurrency Grading

Grade with multiple concurrent requests:

code-grader --policy ./grading-policy --submissions ./submission1 ./submission2 --concurrency 5

Multiple API Keys

Use multiple API keys for higher rate limits:

code-grader --policy ./grading-policy --submissions ./submission1 --api-key "key1,key2,key3"

Options

  • -p, --policy <path> - Path to the grading policy directory (required)
  • -s, --submissions <paths...> - Paths to submission directories (required, can specify multiple)
  • -m, --model <name> - Model name to use for grading (default: "gemini-2.5-flash")
  • -k, --api-key <key> - Google AI API key (or set GEMINI_API_KEY env var, supports comma-separated multiple keys)
  • --base-url <url> - Base URL for the Gemini API (or set GEMINI_API_BASE_URL env var)
  • -c, --concurrency <number> - Number of submissions to grade concurrently (default: 1)
  • -o, --output <path> - Output file path (supports .json, .csv, and .jsonl extensions)
  • --json - Output results as JSON to stdout
  • --csv - Output results as CSV to stdout

Grading Policy Structure

The grading policy directory should contain:

  • README.md - The grading rubric and instructions
  • Optional attachment files (PDF, images, videos, audio) for additional context

Submission Structure

Each submission directory should contain the code files to be graded.

Environment Variables

  • GEMINI_API_KEY - Your Google AI API key (can also be provided via --api-key, supports comma-separated multiple keys)
  • GEMINI_API_BASE_URL - Base URL for the Gemini API (can also be provided via --base-url)

Output Format

JSON

[
    {
        "submission": "submission1",
        "score": 85,
        "scoringDetails": "Detailed feedback...",
        "inputTokens": 1500,
        "outputTokens": 300,
        "totalTokens": 1800
    }
]

CSV

submission,score,scoringDetails,inputTokens,outputTokens,totalTokens
submission1,85,"Detailed feedback...",1500,300,1800

JSONL

{
    "submission": "submission1",
    "score": 85,
    "scoringDetails": "Detailed feedback...",
    "inputTokens": 1500,
    "outputTokens": 300,
    "totalTokens": 1800
}