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

xadrez-cli

v1.0.2

Published

CLI de xadrez com modo normal, modo as cegas e opcao de jogar contra Stockfish.

Downloads

42

Readme

xadrez

CLI de xadrez para terminal, com suporte a:

  • Partida local (2 jogadores)
  • Partida contra Stockfish
  • Modo normal e modo as cegas
  • Menu interativo e tratamento de erros

Requisitos

  • Node.js 18+

Instalacao

Usando npm localmente

npm install
npm start

Usando como CLI global

npm install -g xadrez
xadrez

Como jogar

Ao iniciar, o menu principal oferece:

  1. Jogar (2 jogadores)
  2. Jogar vs Stockfish
  3. Sair

Depois de escolher o tipo de partida, voce escolhe:

  1. Normal
  2. As cegas
  3. Voltar

Se escolher Stockfish, ha um menu de dificuldade:

  1. Facil (depth 4)
  2. Medio (depth 8)
  3. Dificil (depth 16)
  4. Voltar

Entradas de jogada

Digite jogadas no formato esperado pelo chess.js, por exemplo:

  • e4
  • Nf3
  • Qh5
  • exd5

Obs.: o sistema tambem tenta aceitar entrada tipo e2e4, mas o formato SAN (e4, Nf3, etc.) e o mais confiavel.

Comandos durante a partida

  • menu: volta ao menu principal
  • novo: reinicia a partida atual
  • sair: encerra o programa
  • tabuleiro: mostra o tabuleiro (util quando estiver no modo as cegas)

Modo as cegas

No modo as cegas, o console e limpo a cada lance e apenas o ultimo movimento e exibido, por exemplo:

Pretas — Nf6 (g8 → f6)

Scripts

  • npm start: executa a aplicacao
  • npm run check: valida sintaxe de todos os arquivos principais
  • npm test: alias para npm run check

Estrutura do projeto

.
├── index.js
├── package.json
└── src
    ├── controller
    │   └── GameController.js
    ├── engine
    │   └── ChessEngine.js
    ├── player
    │   └── StockfishPlayer.js
    ├── renderer
    │   ├── ChessJsBoardRenderer.js
    │   └── UnicodeBoardRenderer.js
    └── ui
        └── ConsoleUI.js

Publicacao no npm

  1. Atualize a versao no package.json (seguindo semver).
  2. Faca login no npm:
npm login
  1. Verifique o conteudo que sera publicado:
npm pack --dry-run
  1. Publique:
npm publish

Se o pacote for escopado (ex.: @usuario/xadrez), use:

npm publish --access public

Licenca

ISC