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

llmchess

v1.5.6

Published

Play chess against local LLMs, or watch two AIs battle each other. A Python/PyQt6 desktop chess GUI powered by local large language models.

Readme

LLM Chess ️🤖

Play chess against local LLMs, or watch two AIs battle each other — all in a beautiful dark-themed GUI.

PyPI version npm version Python License: MIT GitHub release

LLM Chess is a desktop application that lets you play international chess against AI opponents powered by local or cloud large language models. Supports Ollama, llama.cpp, LM Studio, OpenAI GPT, DeepSeek, and any OpenAI-compatible API.

✨ Features

🎮 Game Modes

  • Human vs AI — Classic mode. Play as White or Black against an LLM.
  • AI vs AI — Watch two LLMs play each other with configurable speed control (pause/resume/step).
  • Each side can use a different model, different backend, different temperature.

💭 AI Thinking Display

  • See the AI's reasoning process for every move
  • Color-coded by side (blue for White, pink for Black)
  • Parses Reasoning: and Move: format with fallback handling

🎭 AI Personas

Choose the AI's "personality" — affects its playing style and reasoning tone:

  • Default — Calm, professional engine
  • Aggressive — Loves attacks and sacrifices
  • Defensive — Values king safety and solid positions
  • Creative — Unusual openings and tactical surprises
  • Teacher — Explains reasoning clearly, great for learning

🎨 UI Highlights

  • Dark Catppuccin-themed PyQt6 interface
  • Click-to-move with legal-move highlighting
  • Last-move markers (yellow) and check indicators (red)
  • Full move history in SAN notation
  • Real-time FEN display
  • Promotion dialog (queen/rook/bishop/knight)
  • Undo moves

📦 Installation

Option 1: pip (recommended)

pip install llmchess
llmchess

Or run as a module:

python -m llmchess

Option 2: npm (Node.js)

npm install -g llmchess
llmchess

The npm wrapper will auto-install the Python llmchess package on first run.

Option 3: DEB package (Ubuntu/Debian)

sudo dpkg -i llmchess_1.5.5_all.deb

The launcher will auto-install missing Python dependencies (PyQt6, python-chess, httpx).

Option 4: From source

git clone https://github.com/oemoem12/LLMChess.git
cd LLMChess
pip install -e .
python main.py

🔧 Setup LLM Backend

LLM Chess is backend-agnostic — it speaks OpenAI-compatible HTTP API. Pick any one:

Ollama (easiest)

# Install from https://ollama.com
ollama pull qwen2.5:7b
ollama serve  # default: http://localhost:11434

llama.cpp

./llama-server -m model.gguf --port 8080

LM Studio

Open LM Studio → Developer tab → Start Local Server (default: http://localhost:1234)

🚀 Quick Start

  1. Start your LLM server (Ollama/llama.cpp/LM Studio)
  2. Launch LLM Chess: llmchess
  3. Open Settings → select your backend → click Test Connection
  4. Choose a model in the connection settings
  5. Pick a game mode (Human vs AI / AI vs AI) and a persona
  6. Click a piece → click target square to move
  7. Watch the AI Thinking panel to see your opponent's reasoning

🎬 Screenshots

┌─────────────────────┬──────────────────┐
│  Game Mode          │  Move History    │
│  [Human vs AI ▼]    │  1. e4 e5        │
│  [White (first) ▼]  │  2. Nf3 Nc6      │
│                     │  3. Bb5 a6       │
│  ♔ ♕ ♖ ♗ ♘ ♙        │  ...             │
│  ─────────────────  │                  │
│  Chess Board        │  AI Thinking     │
│  (8×8)              │  ━━━ White AI ━━ │
│  ─────────────────  │  Move: e2e4      │
│  [New Game] [⚙ Set] │  Reasoning:      │
│                     │  Classical king  │
└─────────────────────┴──────────────────┘

🛠️ Tech Stack

  • PyQt6 — Cross-platform GUI
  • python-chess — Chess rules, FEN/PGN handling
  • httpx — OpenAI-compatible HTTP client
  • setuptools + Trusted Publisher — Zero-token PyPI release

📐 Architecture

chess_app/
├── __init__.py            # Package entry, version, main()
├── __main__.py            # python -m chess_app support
├── main.py                # GUI entry point
├── board_widget.py        # Chess board renderer (PyQt6)
├── game_controller.py     # Main window + game flow + AI vs AI logic
├── llm_connector.py       # OpenAI-compatible LLM client + persona prompts
└── settings_dialog.py     # Tabbed config UI (White/Black sides)

🤝 Contributing

PRs welcome! Some ideas:

  • [ ] Save/load PGN files
  • [ ] Tournament mode (round-robin between N models)
  • [ ] Stockfish-LLM hybrid (use Stockfish for blunders, LLM for variety)
  • [ ] Post-game analysis with LLM commentary
  • [ ] Online multiplayer via WebSocket

📜 License

MIT — do whatever you want, just don't blame me if the AI hangs your king.

🔗 Links

  • PyPI: https://pypi.org/project/llmchess/
  • GitHub: https://github.com/oemoem12/LLMChess
  • Issues: https://github.com/oemoem12/LLMChess/issues
  • 中文 README: README_zh.md