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

debateloop

v0.1.3

Published

Structured CLI debate loops powered by OpenCode

Readme

debateloop

debateloop is a terminal CLI for running structured model-vs-model debates on top of your local OpenCode setup.

By default, each stage uses a 60000ms timeout.

It runs a fixed debate loop:

  1. Debater A opening answer
  2. Debater B opening answer
  3. Debater A critique of B
  4. Debater B critique of A
  5. Debater A revised answer
  6. Debater B revised answer
  7. Judge verdict

The result is a winner-first summary plus a saved transcript you can inspect later.

Requirements

  • Node.js >=20.12.0
  • OpenCode installed and working locally
  • At least three available models in OpenCode:
    • one for Debater A
    • one for Debater B
    • one for the Judge

Install

From npm

npm install -g debateloop

From a local checkout

npm install
npm run build
npm link

Usage

Start a debate:

debateloop ask "Why is TypeScript better than JavaScript?"

Override the models for one run:

debateloop ask "Which is better: microservices or a monolith?" \
  --debater-a github-copilot/claude-sonnet-4.6 \
  --debater-b github-copilot/gpt-5.4 \
  --judge github-copilot/claude-haiku-4.5

Show every model output as each stage completes:

debateloop ask "When does clean code make a codebase worse?" --debug

Override the stage timeout for one run:

debateloop ask "Should we rewrite this service?" --stage-timeout-ms 90000

Inspect a saved transcript:

debateloop inspect <run-id>

First Run

On the first run, debateloop asks you to choose:

  • Debater A model
  • Debater B model
  • Judge model

It saves this config under:

~/.config/debateloop/config.json

Saved transcripts live under:

~/.config/debateloop/runs/

The saved config also contains reliability settings, including the default stage timeout. A CLI override such as --stage-timeout-ms 90000 applies only to the current run and does not rewrite your saved config.

If you already had an older config file, it keeps your previously saved timeout instead of silently switching to a new default. To make the saved timeout permanent, edit:

~/.config/debateloop/config.json

and update:

{
  "reliability": {
    "stageTimeoutMs": 60000
  }
}

If you want to reset the local configuration completely and re-run guided setup on the next command:

rm ~/.config/debateloop/config.json

How It Behaves

  • opening answers are generated independently before critique begins
  • retries are applied conservatively for transient stage failures
  • judge output is validated as structured JSON
  • partial transcripts are preserved when a run fails
  • inspect shows prompts, outputs, attempts, durations, and stage errors

Development

Install dependencies:

npm install

Run the CLI in dev mode:

npm run dev -- ask "Should tests come first?"

Run tests:

npm test

Build:

npm run build

Notes

  • debateloop depends on your local OpenCode configuration and available providers/models
  • different judge models may produce longer or more verbose verdicts; transcripts preserve the raw output for inspection
  • this project is optimized for structured comparison and tradeoff analysis, not open-ended agentic planning