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

judge-dredd

v0.1.1

Published

Local kit for ingesting corpora, synthesizing LLM eval questions, reviewing gold, and judging model answers.

Readme

synthkit

A local kit for ingesting a corpus, synthesizing LLM eval questions, reviewing gold, and judging model answers.

test

The product is synthkit. On npm the package and the command you type are judge-dredd:

npx judge-dredd help

Do not npx synth or npm i synthkit — those names are unrelated packages. After a clone, npx synth is the local CLI alias. Live xAI keys are optional.

First try

git clone https://github.com/Benj124/judge-dredd.git
cd judge-dredd
npm install
cp .env.example .env
docker compose up -d          # local Postgres (pgvector). Same as npm run db:up
npm run db:migrate
npm run dev                   # dashboard at http://localhost:3000

Or from npm (no clone): npx judge-dredd help. Live xAI is optional — use stubs:

EVAL_LLM_STUB=1     # judge / generate / synthesize without XAI_API_KEY
RAG_EMBED_STUB=1    # embeddings without a live embed API
  • XAI_API_KEY: judge, generate-then-judge, live embeddings.
  • XAI_API_KEY2: synthesis only (synth generate / /api/synthesize). Not the judge key.

Default DB URL: postgres://judge:[email protected]:5432/synthkit (never AWS). If you still have an older Docker volume from a previous database name, remove it or createdb synthkit.

Golden path

Ingest one documentsynthesize 5 itemsreviewrun judgeexport JSONL. No live Wikipedia or live LLM required:

docker compose up -d
npm run db:migrate

# 1. Ingest (local fixture; swap --file for --url https://… when you have network)
npx judge-dredd ingest --file src/lib/graph/fixtures/corpus-note.md

# 2–3. Synthesize 5 questions and keep them as gold (stub LLM)
EVAL_LLM_STUB=1 npx judge-dredd generate --slug corpus-note --n 5 --keep

# 4. Run the judge / campaign
EVAL_LLM_STUB=1 npx judge-dredd run --versionId <id>

# 5. Export gold JSONL
npx judge-dredd export --versionId <id> --format jsonl

generate prints versionId. --keep marks every synthesized item gold in the same step. To review later instead: omit --keep, then npx judge-dredd review --versionId <id> --keep-all. npm run db:migrate is idempotent; if an older install still has vector(32) embeddings it truncates rag_chunks and you re-ingest.

CLI: npx judge-dredd ingest|generate|review|run|export|pairwise. After a clone, npx synth and npm run synth -- are the same binary.

Connectors (GCP data store, Databricks Unity Catalog)

Pull articles from a Vertex AI Search / Discovery Engine data store or a Databricks Unity Catalog vector search index into the same text_documents table as --file / --url. Then synth generate / synth run on those slugs. Credentials are env vars or flags — never committed files.

# GCP: bearer token OR service-account JSON path (JWT → access token)
npx judge-dredd ingest --gcp-data-store projects/P/locations/global/collections/default_collection/dataStores/DS \
  --token "$GCP_ACCESS_TOKEN"
npx judge-dredd ingest --gcp-data-store projects/P/locations/global/dataStores/DS \
  --service-account ./sa.json   # or GOOGLE_APPLICATION_CREDENTIALS

# Databricks: PAT OR service-principal client_id/client_secret
npx judge-dredd ingest --databricks-index main.corpus.articles \
  --host https://your-workspace.cloud.databricks.com \
  --token "$DATABRICKS_TOKEN"
npx judge-dredd ingest --databricks-index main.corpus.articles \
  --host https://your-workspace.cloud.databricks.com \
  --client-id "$DATABRICKS_CLIENT_ID" --client-secret "$DATABRICKS_CLIENT_SECRET" \
  --query "*" --text-column text --title-column title

EVAL_LLM_STUB=1 npx judge-dredd generate --slug <slug-from-ingest> --n 5 --keep

GCP_ACCESS_TOKEN / GOOGLE_APPLICATION_CREDENTIALS / DATABRICKS_HOST / DATABRICKS_TOKEN / DATABRICKS_CLIENT_ID / DATABRICKS_CLIENT_SECRET are documented in .env.example.

Demo: Wikipedia whales

Optional demo corpus (five public Wikipedia articles). Not required for the golden path.

npx playwright install chromium   # live scrape only
npm run graph:ingest-whales
RAG_EMBED_STUB=1 npm run rag:ingest-whales

Scripts

| Command | Description | | ------- | ----------- | | npm run dev | Start development server | | npm run build | Production build | | npm run start | Serve production build | | npm run lint | Run ESLint | | npm test | Run unit tests | | npm run test:coverage | Unit tests with coverage report | | npm run db:up | Start local Postgres (docker compose up) | | npm run db:migrate | Apply schema | | npm run db:smoke | Write then read one evaluate record | | npm run eval:questions | Run the stub question set | | npm run synth | CLI: ingest / generate / review / run / export / pairwise | | npm run ingest | Ingest a corpus into text_documents | | npm run rag:query | Hybrid retrieve via LangGraph (stub embedder in automated paths) | | npm run rag:ground | Ground RAG corpus / checks | | npm run rag:ingest | Chunk + embed stored text_documents | | npm run rag:ingest-whales | Demo: RAG ingest the whale Wikipedia slugs | | npm run etl:eval-data | ETL evaluation dataset into the app store | | npm run graph:ingest-whales | Demo: scrape 5 Wikipedia whale articles (Playwright) |

Contributing

See CONTRIBUTING.md. CI runs npm test with a Postgres service.

License

MIT. See LICENSE.