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

pi-twins

v0.3.1

Published

Dual-model synthesis for Pi — run the same prompt on two models, get one synthesized answer

Readme

pi-twins

Join dotfield.xyz on Discord

CI Publish npm version npm downloads License: MIT Pi package Trusted Publishing

Run the same prompt on two models, get one synthesized answer.

What this is

pi-twins sends your prompt to two AI models in parallel, then Pi itself reads both responses and synthesizes a single answer from the best parts. Configure model pairs via YAML. No more manually tabbing between chatbot UIs to compare answers.

Features

  • Dual-model execution — run the same prompt on two models simultaneously
  • Automatic synthesis — Pi reads both responses and produces one unified answer
  • Synthesis controls — choose balanced, decision, critique, or concise final-answer modes with optional instructions
  • YAML configuration — define model pairs (e.g. Claude + Gemini) in ~/.pi/twins.yaml
  • Model discovery/twins:scan to see which models are available
  • On-demand only — activate via /twins:run when you want it, no overhead otherwise

Install

Install the published npm package with Pi:

pi install npm:pi-twins

Pin a specific version:

pi install npm:[email protected]

Install into the current project instead of your user Pi settings:

pi install npm:pi-twins -l

Or install from GitHub:

pi install git:github.com/eiei114/pi-twins

Try it without permanently installing:

pi -e npm:pi-twins

Quick start

Try this package locally:

pi -e .

Then run:

/twins:run

Enter a prompt when asked. Pi runs both models in parallel and synthesizes one answer.

Configuration

Create ~/.pi/twins.yaml:

pairs:
  default:
    - anthropic/claude-sonnet-4
    - google/gemini-2.5-pro
  coding:
    - anthropic/claude-sonnet-4
    - openai/gpt-4o

# Optional: omit this block to keep balanced default synthesis.
synthesis:
  mode: decision # balanced | decision | critique | concise
  instructions: "Prioritize concrete next steps."

/twins:run uses the default pair when present. If default is missing, it falls back to the first configured pair. The optional top-level synthesis block sets reusable defaults for the final answer; existing configs with only pairs: keep the balanced behavior.

Run /twins:config to create a starter file, or /twins:scan to list model IDs.

Commands

| Command | Description | |---|---| | /twins:run | Send the same prompt to two models and synthesize one answer | | /twins:scan | List available model IDs for ~/.pi/twins.yaml | | /twins:config | Create or show the pi-twins config file |

The twins_run tool is also available for agent-driven twin runs. Tool calls may override synthesis defaults per request:

{
  "prompt": "Choose the safest rollout plan for this migration",
  "pair": "default",
  "synthesisMode": "decision",
  "synthesisInstructions": "Call out rollback risks explicitly."
}

Package contents

| Path | Purpose | |---|---| | extensions/ | Pi extension entrypoints (/twins:* commands, twins_run tool) | | lib/ | Config loader, model scanner, parallel runner, synthesis helpers | | docs/ | Usage examples and release notes |

Development

npm install
npm run ci

npm run ci runs typecheck, tests, and npm pack --dry-run via pack:check.

Local smoke test:

pi -e .

Release

This package uses npm Trusted Publishing (no NPM_TOKEN required).

npm version patch   # or minor / major
git push

Pushing a package.json version bump to main triggers auto-release.yml, which tags the release and dispatches publish.yml.

See docs/release.md for setup details.

Docs

Security

Pi packages can execute code with your local permissions. Review extensions before installing third-party packages.

For vulnerability reporting, see SECURITY.md.

Links

  • npm: https://www.npmjs.com/package/pi-twins
  • GitHub: https://github.com/eiei114/pi-twins
  • Issues: https://github.com/eiei114/pi-twins/issues

License

MIT