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

fight-for-me

v0.5.2

Published

AI Debate CLI - Codex vs Claude multi-round debates via local CLIs

Readme

fight-for-me

Let two AIs fight for the best answer — then turn the winner into code.

한국어 | npm | GitHub


Why AI Debate?

A single AI gives you one perspective. But real engineering decisions need trade-offs, counter-arguments, and stress-testing. fight-for-me pits Codex (OpenAI) against Claude (Anthropic) in a structured, multi-round debate — so you get battle-tested answers, not just auto-complete.

One AI is an opinion. Two AIs debating is due diligence.


Three Modes

1. Agent vs Agent — Structured AI Debate

Two AI agents argue your question from opposing sides across multiple rounds, then a judge synthesizes the best answer.

ffm "Should we use REST or GraphQL for our new API?"
┌─────────────────────────────────────────────────┐
│  Round 1                                        │
│  Codex: "REST is simpler, better caching..."    │
│  Claude: "GraphQL reduces over-fetching..."     │
│                                                 │
│  Round 2                                        │
│  Codex: "But GraphQL adds complexity..."        │
│  Claude: "Schema-first approach prevents..."    │
│                                                 │
│  Round 3                                        │
│  Codex: "For this use case, consider..."        │
│  Claude: "Agreed, but also note..."             │
│                                                 │
│  ✨ Synthesis                                   │
│  "Use REST for public APIs, GraphQL for..."     │
└─────────────────────────────────────────────────┘

2. You + Agents — Interactive 3-Way Discussion

Jump into the debate as a third participant. Steer the conversation, challenge assumptions, or provide domain context that only you know.

ffm "Best state management for React?" -i
┌─────────────────────────────────────────────────┐
│  Round 1                                        │
│  Codex: "Redux Toolkit for large apps..."       │
│  Claude: "Zustand is lighter and simpler..."    │
│                                                 │
│  👤 You: "We need SSR support and the team      │
│           is junior — simplicity matters most"  │
│                                                 │
│  Round 2                                        │
│  Codex: "Given SSR needs, consider..."          │
│  Claude: "For junior teams, Zustand's API..."   │
│  ...                                            │
└─────────────────────────────────────────────────┘

3. Debate → Code — Plan Mode

The agents debate how to change your code, then you apply the consensus directly to your codebase. From discussion to implementation in one flow.

ffm "How should we refactor the auth module?" --plan
┌─────────────────────────────────────────────────┐
│  Debate: 3 rounds on refactoring strategy       │
│  ...                                            │
│  ✨ Consensus: "Extract JWT logic into          │
│     service layer, add refresh token rotation"  │
│                                                 │
│  Apply changes to codebase? (y/n)               │
│  > Codex applies the agreed-upon changes...     │
└─────────────────────────────────────────────────┘

Quick Start

Prerequisites

Install

npm install -g fight-for-me

Basic Usage

# Start a debate
ffm "Your question here"

# 5-round debate
ffm "Compare ORMs for Node.js" -r 5

# Join as a participant
ffm "Microservices vs monolith?" -i

# Debate and apply code changes
ffm "Refactor this module" --plan

# Include files as context
ffm "How to improve this code?" --files src/index.ts src/utils.ts

Options

| Option | Description | Default | |--------|-------------|---------| | -r, --rounds <n> | Number of debate rounds | 3 | | -j, --judge <provider> | Judge for synthesis: codex, claude, both | claude | | -f, --format <format> | Output format: pretty, json, markdown | pretty | | --plan | Enable plan mode (debate → apply code) | false | | -i, --interactive | Join as a third participant | false | | --no-stream | Disable streaming output | - | | --no-synthesis | Skip final synthesis | - | | --no-context | Disable project context collection | - | | --files <paths...> | Include specific files as context | - |

Commands

| Command | Description | |---------|-------------| | ffm [question] | Start a debate (default) | | ffm config | View or update configuration | | ffm status | Show current status and configuration | | ffm stop | Stop running agent processes | | ffm model | Configure AI models |

REPL Commands

Inside the interactive REPL:

| Command | Description | |---------|-------------| | /plan <topic> | Debate & apply code changes | | /join <topic> | Interactive 3-way debate (You + Codex + Claude). Alias: /i | | /rounds <n> | Set number of debate rounds | | /judge <provider> | Set judge: codex, claude, both | | /format <format> | Output format: pretty, json, markdown | | /stream | Toggle streaming output | | /files <paths...> | Set context files (replaces current list) | | /context | Toggle project context collection. Alias: /nocontext | | /model codex <name> | Set Codex model (from known models list) | | /model claude <name> | Set Claude model (from known models list) | | /model list | Show currently configured models and known models | | /config | Manage persistent configuration | | /status | Check agent CLI status | | /stop | Stop running fight-for-me processes | | /help | Show help | | /exit | Exit the REPL. Alias: /quit |

Configuration

Default settings can be changed via ffm config:

| Setting | Description | Default | |---------|-------------|---------| | codexCommand | Codex CLI command | codex exec --skip-git-repo-check - | | claudeCommand | Claude CLI command | claude -p | | commandTimeoutMs | Agent command timeout (ms) | 180000 | | defaultRounds | Default debate rounds | 3 | | defaultJudge | Default judge | claude | | defaultFormat | Default output format | pretty | | stream | Enable streaming | true | | codexModel | Codex model override | - | | claudeModel | Claude model override | - | | claudeApplyCommand | Claude CLI command for plan mode | claude -p --allowedTools "Edit Write Bash Read" | | applyTimeoutMs | Apply command timeout (ms) | 300000 |

How It Works

  You
   │
   ▼
┌──────┐     ┌───────────────────────────────────┐
│ ffm  │────▶│         Debate Engine              │
└──────┘     │                                     │
             │  ┌───────┐  Round N  ┌────────┐    │
             │  │ Codex │◄────────►│ Claude │    │
             │  └───────┘          └────────┘    │
             │       │                  │         │
             │       ▼                  ▼         │
             │  ┌─────────────────────────────┐  │
             │  │    Judge (Synthesis)         │  │
             │  └─────────────────────────────┘  │
             └───────────────┬───────────────────┘
                             │
              ┌──────────────┼──────────────┐
              ▼              ▼              ▼
         Pretty Text    JSON Output   Code Changes
                                      (Plan Mode)
  1. Your question is sent to both Codex and Claude
  2. Each agent responds with their perspective
  3. They debate back and forth for N rounds
  4. A judge synthesizes the debate into a final consensus
  5. In plan mode, the consensus is applied to your codebase

License

MIT