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

@nayannath/the-tiebreaker

v1.2.1

Published

AI-powered decision analysis with pros and cons, comparison tables, and SWOT reports across web, CLI, and SDK usage.

Readme

The Tiebreaker

npm version npm downloads CI

The Tiebreaker helps people make clearer decisions with AI-generated analysis. Provide a decision you need to make, choose an analysis framework, and receive a structured response as a pros and cons list, a comparison table, or a SWOT analysis.

It is designed for everyday and professional decisions: career moves, product choices, architecture tradeoffs, launch plans, vendor selection, relocation, and other situations where the tradeoffs are not obvious.

The project ships as:

  • Web app: a React decision dashboard served by Express.
  • CLI: a terminal tool for fast decision analysis.
  • SDK: a small Node.js API for integrating decision analysis into other tools.

Gemini API calls run server-side or in Node.js. Browser users interact with a local API proxy, so GEMINI_API_KEY is not exposed in the client bundle.


What It Does

The Tiebreaker accepts a decision prompt such as:

Should I accept this new job offer?
Should our team move from a monolith to microservices?
Should I relocate to Amsterdam or stay in my current city?

Then it can produce:

  • Pros and cons: balanced advantages and disadvantages, including short-term and long-term considerations.
  • Comparison table: side-by-side evaluation of options or "do it" vs "do not do it".
  • SWOT analysis: strengths, weaknesses, opportunities, and threats with practical decision checkpoints.

The output is meant to support judgment, not replace it. The assistant surfaces tradeoffs, assumptions, risks, and questions that deserve more information.


Installation

The Tiebreaker is distributed through npm and GitHub Packages:

npmjs.com:        @nayannath/the-tiebreaker
GitHub Packages: @nayan07cse/the-tiebreaker

Install globally from npm:

npm install -g @nayannath/the-tiebreaker

Set your Gemini API key:

export GEMINI_API_KEY="your-gemini-api-key"

Run the CLI:

the-tiebreaker "Should I accept the new role?" --pros-cons
the-tiebreaker "Postgres vs MongoDB for this product" --compare
the-tiebreaker "Should we launch in Europe this quarter?" --swot

Run the packaged web app:

the-tiebreaker-web

Open:

http://localhost:3000

Use a different port:

PORT=4000 the-tiebreaker-web

GitHub Packages users can install the GitHub-scoped package after authenticating npm for GitHub's registry:

npm login --scope=@nayan07cse --auth-type=legacy --registry=https://npm.pkg.github.com
npm install -g @nayan07cse/the-tiebreaker --registry=https://npm.pkg.github.com

CLI Options

the-tiebreaker "Your decision here" [options]

Options:

--pros-cons    Balanced pros and cons list. Default.
--compare      Markdown comparison table.
--swot         SWOT analysis.
--help, -h     Show CLI help.

Examples:

the-tiebreaker "Should I buy or lease a car?"
the-tiebreaker "AWS vs GCP for this project" --compare
the-tiebreaker "Should we open a second location?" --swot

SDK Usage

import { analyzeDecision } from "@nayannath/the-tiebreaker";

const result = await analyzeDecision(
  "Should we rewrite the dashboard in React?",
  "swot"
);

console.log(result);

Supported analysis types:

type AnalysisType = "pros-cons" | "comparison" | "swot";

The SDK requires GEMINI_API_KEY in the Node.js environment.


Local Development

Prerequisites:

  • Node.js 20+
  • npm
  • Gemini API key

Install dependencies:

npm install

Create a local environment file:

cp .env.example .env

Set:

GEMINI_API_KEY="your_api_key_here"

Run the development server:

npm run dev

Open:

http://localhost:3000

Build the full package:

npm run build

Run the built web app:

npm start

Validate the workspace:

npm run lint
npm audit --audit-level=moderate
npm pack --dry-run --ignore-scripts

Environment Variables

GEMINI_API_KEY   Required for Gemini analysis calls.
PORT             Optional web server port. Defaults to 3000.
HOST             Optional web server host. Defaults to 0.0.0.0.

Do not commit .env; it is ignored by .gitignore.


Distribution

Release builds are published to both npmjs.com and GitHub Packages. Package versions are immutable in each registry, so a new release requires a version bump:

npm version patch
git push --follow-tags

Automation is handled by GitHub Actions:

  • .github/workflows/ci.yml: validates pushes and pull requests.
  • .github/workflows/npm-publish.yml: publishes @nayannath/the-tiebreaker to npmjs.com.
  • .github/workflows/github-packages.yml: publishes @nayan07cse/the-tiebreaker to GitHub Packages.

Troubleshooting

GEMINI_API_KEY environment variable is required

Set the key before running the CLI, SDK, or web server:

export GEMINI_API_KEY="your-gemini-api-key"

Architecture

  • Server (server.ts): Express API for /api/analyze, static web serving, and production runtime.
  • Client (src/App.tsx): React decision dashboard with framework selection and Markdown rendering.
  • Gemini service (src/services/geminiService.ts): Shared analysis function for browser proxy, CLI, and SDK usage.
  • CLI (src/cli.ts): Terminal interface for direct decision analysis.
  • Package server (bin/serve.js): Starts the compiled web app after global npm installation.

License

Apache-2.0