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

polymind-cli

v1.0.0

Published

PolyMind CLI - Multi-model AI council debates in your terminal with interactive TUI

Downloads

7

Readme

PolyMind CLI

The LLM Council: Let multiple AI models collaborate, review each other's work, and synthesize the best response

npm version License: MIT

🏛️ The LLM Council

Instead of querying a single AI model, PolyMind creates a council of AI models that work together:

  1. Stage 1 - First Opinions: All models respond to your query individually
  2. Stage 2 - Peer Review: Models review and rank each other's responses (anonymized)
  3. Stage 3 - Chairman Synthesis: A designated Chairman compiles the final answer

Why use an LLM Council?

  • Eliminates single-model bias - Multiple perspectives reduce errors
  • Peer review improves quality - Models critique each other anonymously
  • Best-of-breed synthesis - Chairman combines the strongest insights
  • Transparency - See all individual responses in a tab view

🌟 What's New

v1.0.0 brings the LLM Council system with:

  • 🏛️ LLM Council Mode - Multi-model collaboration with 3-stage workflow
  • 🔥 Live Streaming - Real-time AI responses with token-by-token streaming
  • 📊 Peer Review System - Models rank each other anonymously
  • 🎯 Chairman Synthesis - Final response from the council's best insights
  • 📚 RAG Support - Context-aware responses from your codebase
  • 🔌 Multi-Provider - Gemini, GPT, Claude, Grok, and more
  • 🎨 Beautiful TUI - Tab view for comparing model responses

🚀 Quick Start

# Install globally
npm install -g @polymind/cli

# Configure your API keys (at least 2 providers recommended)
polymind init
export OPENAI_API_KEY="your-key"
export ANTHROPIC_API_KEY="your-key"

# Query the LLM Council
polymind council "What is the future of artificial intelligence?"

# Or start live chat with a single model
polymind live --rag

✨ Key Features

🏛️ LLM Council Mode (NEW!)

Harness the collective intelligence of multiple AI models working together.

polymind council "Explain quantum computing"

How it works:

Stage 1: First Opinions

  • Query sent to all council members (GPT, Gemini, Claude, Grok)
  • Each model responds independently
  • View responses in an interactive tab interface

Stage 2: Peer Review

  • Each model reviews OTHER models' responses (anonymized as "Response A", "Response B")
  • Models rank responses by accuracy and insight
  • Prevents favoritism and bias

Stage 3: Chairman Synthesis

  • Designated Chairman reviews all responses and rankings
  • Synthesizes the best insights into one final answer
  • Shows which sources were incorporated

Example Council:

polymind council "Should we use microservices?" \
  --gemini-key $GEMINI_API_KEY \
  --openai-key $OPENAI_API_KEY \
  --anthropic-key $ANTHROPIC_API_KEY \
  --chairman "Claude Sonnet"

Gemini Deep Reasoning Preset:

# Use the highest reasoning Gemini models
polymind council "Explain quantum entanglement" --gemini-deep

# With custom chairman
polymind council "Your question" --gemini-deep --chairman "Gemini 2.5 Pro"

This preset includes:

  • Chairman: Gemini 3 Pro Preview
  • Members: Gemini 3 Pro Preview, Gemini 2.5 Pro, Gemini 2.5 Flash

🔴 Live Streaming Mode

Experience real-time AI responses with token-by-token streaming, just like ChatGPT but in your terminal.

polymind              # Launch live chat
polymind live --rag   # Enable RAG for context

Features:

  • Real-time streaming responses
  • Automatic codebase indexing
  • Slash command support (/help, /rag, /model, /exit)
  • Context-aware conversations
  • Model switching on the fly

📚 RAG (Retrieval-Augmented Generation)

Automatically indexes your workspace to provide context-aware responses about your code.

polymind live --rag  # Enable RAG mode

What it does:

  • Indexes .ts, .tsx, .js, .jsx, .md, .json files
  • Semantic search across your codebase
  • Injects relevant context into AI queries
  • Real-time stats: 📚 Indexed 247 files (1.2MB)

🎭 Live Multi-Agent Debates

Watch multiple AI personas deliberate on complex topics in real-time.

polymind debate "Should we colonize Mars?"
polymind debate "Is AGI achievable by 2030?" --rounds 4

Council Members:

  • 🎯 Pragmatist - Practical problem solver
  • 🚀 Visionary - Future-focused innovator
  • 🤔 Skeptic - Critical analyst
  • ⚖️ Ethicist - Moral compass

Each persona streams their argument in real-time, then a synthesized conclusion is generated.

🔌 Multi-Model Support

Switch between providers and models dynamically:

# Configure your provider
polymind init --provider gemini

# Switch models mid-conversation
/model gemini-2.0-flash-exp
/model gpt-4-turbo
/model claude-3-opus

Supported Providers:

  • Google Gemini - gemini-2.0-flash-exp, gemini-1.5-pro, gemini-1.5-flash
  • OpenAI - gpt-4-turbo, gpt-4, gpt-3.5-turbo (coming soon)
  • Anthropic - claude-3-opus, claude-3-sonnet, claude-3-haiku (coming soon)

📚 Commands

Interactive Commands

| Command | Alias | Description | |---------|-------|-------------| | polymind | - | Launch live streaming chat (default) | | polymind live | l | Explicitly start live mode | | polymind debate <question> | - | Start multi-agent council debate | | polymind init | - | Configure API keys and settings | | polymind status | - | Check configuration |

Slash Commands (In Chat)

| Command | Description | |---------|-------------| | /help | Show available commands | | /rag | Toggle RAG mode | | /model <name> | Switch AI model | | /clear | Clear chat history | | /exit | Quit application | | /debate <topic> | Start debate mode |

🔧 Configuration

Initial Setup

polymind init

You'll be prompted for:

  • AI provider (Gemini, OpenAI, Anthropic)
  • API key
  • Default model
  • Feature preferences (streaming, RAG, etc.)

Manual Configuration

Config is stored in ~/.config/polymind/config.json:

{
  "provider": "gemini",
  "apiKey": "your-api-key-here",
  "streaming": true,
  "quirks": true,
  "animations": true
}

Environment Variables

export POLYMIND_API_KEY="your-key"
export POLYMIND_PROVIDER="gemini"

🎨 Advanced Usage

Live Chat with RAG

# Enable RAG to query your codebase
polymind live --rag

# In chat:
> Explain how the streaming client works
> What files implement the debate logic?
> Summarize the RAG engine architecture

Custom Debate Parameters

# More rounds
polymind debate "Future of work" --rounds 5

# Specific model
polymind debate "AI ethics" --model gemini-1.5-pro --rounds 3

Keyboard Shortcuts

  • ESC - Exit application
  • Ctrl+C (during stream) - Cancel current response
  • Ctrl+C (idle) - Exit application

🏗️ Architecture

Inspired by Gemini CLI, PolyMind uses:

  • Ink - React for terminal UIs
  • Google Generative AI SDK - For Gemini models
  • Streaming Architecture - Real-time token-by-token responses
  • RAG Engine - Document indexing and semantic search
  • Multi-Agent System - Parallel persona processing

📦 Installation

From npm

npm install -g @polymind/cli

From Source

git clone https://github.com/reyyanxahmed/polymind-cli.git
cd polymind-cli
npm install
npm run build
npm link

🚀 Deployment

For Developers

# Build and test locally
npm run build
npm link

# Deploy to npm
./scripts/deploy.sh 1.0.0

CI/CD

GitHub Actions automatically publishes to npm when you push a version tag:

git tag v1.0.0
git push origin v1.0.0

git push origin v1.0.0


## 🛠️ Development

### Local Development

```bash
# Clone the repo
git clone https://github.com/reyyanxahmed/polymind-cli.git
cd polymind-cli

# Install dependencies
npm install

# Run in development mode
npm run dev

# Build for production
npm run build

# Link globally for testing
npm link

Project Structure

polymind-cli/
├── src/
│   ├── core/
│   │   ├── streaming-client.ts    # Multi-model streaming client
│   │   └── rag-engine.ts          # RAG indexing and search
│   ├── commands/
│   │   ├── live.ts                # Live streaming chat command
│   │   ├── live-debate.ts         # Live debate command
│   │   └── init.ts                # Setup wizard
│   ├── ui/
│   │   ├── apps/
│   │   │   ├── LiveChatApp.tsx    # Main streaming chat UI
│   │   │   └── LiveDebateApp.tsx  # Multi-agent debate UI
│   │   └── components/
│   └── utils/
│       └── slash-commands.ts      # Command parsing
├── package.json
└── README.md

🤝 Contributing

We welcome contributions! Areas where you can help:

  • Provider Integrations - OpenAI, Anthropic, Ollama, etc.
  • RAG Enhancements - Better embeddings, vector databases
  • UI/UX - More animations, themes, customization
  • Features - Image support, voice, web search
  • Documentation - Tutorials, examples, translations

See CONTRIBUTING.md for guidelines.

📄 License

MIT © PolyMind Team

🔗 Links

  • GitHub: https://github.com/reyyanxahmed/polymind-cli
  • npm: https://www.npmjs.com/package/@polymind/cli
  • Issues: https://github.com/reyyanxahmed/polymind-cli/issues
  • Inspiration: Gemini CLI

🙏 Credits

Built with inspiration from:


Made with ❤️ by the PolyMind Team

Type polymind and let the AI council begin!