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 🙏

© 2024 – Pkg Stats / Ryan Hefner

cli-js-chess

v1.2.3

Published

A Terminal Chess Game Made With Javascript

Downloads

4

Readme

cli-js-chess

A Terminal Chess Game Made With Javascript

Usage

npx cli-js-chess path/to/config.json

# Or Install For Offline Use

npm i -g cli-js-chess
js-chess path/to/config.json

How To Play

sx9dev@github:/ $ js-chess

====== JavascriptChess ======
          [ Black ]          
   +------------------------+
 8 | ♜  ♞  ♝  ♛  ♚  ♝  ♞  ♜ |
 7 | ♟  ♟  ♟  ♟  ♟  ♟  ♟  ♟ |
 6 | ■  ■  ■  ■  ■  ■  ■  ■ |
 5 | ■  ■  ■  ■  ■  ■  ■  ■ |
 4 | ■  ■  ■  ■  ■  ■  ■  ■ |
 3 | ■  ■  ■  ■  ■  ■  ■  ■ |
 2 | ♙  ♙  ♙  ♙  ♙  ♙  ♙  ♙ |
 1 | ♖  ♘  ♗  ♕  ♔  ♗  ♘  ♖ |
   +------------------------+
     a  b  c  d  e  f  g  h  
          [ White ]          


◇ Enter A Move (w): _

To Move A Piece Just Enter The Square To Move It To.

Example: e4 // Move The Pawn From e2 To e4 Example2: Nf3 // Move The Night From g1 To f3

Commands

◇ Enter A Move (w): .help_

.moves (square)

Returns Moves For The Given Square. If No Square Is Provided It Will List All Posible Moves.

Example:

◇ Enter A Move (w): .moves e2 

====== JavascriptChess ======
[ 'e3', 'e4' ]
Returning To The Game In 5 Seconds

.load (game-fen)

Loads A Game From The Given FEN.

.eval (js-code)

Runs Inputed Javascript Code. Note: This Is For Testing Purposes.

.gen

Generates A Config File. More On This Later.

.bot

Uses A Chess Engine (Specified In Config File) To Move For You. By Default Is Disabled.

.history

List Previous Moves.

.fen

Print Game FEN.

.undo

Undo A Move.

.exit / .q

Exit The Game.

Configuration

Doing .gen Will Generate A Config File (cli-js-chess-config.json) With Options You Can Change.

bot

Options For The .bot Command.

bot.enabled => boolean

Enable The Command Or Not. Default: false

bot.engine => string

Path To Chess Engine Executable To Use. Default: /bin/stockfish

chars

Change How The Board Looks.

chars.color.piece => string

An Emoji, Letter, Or Anything.

chars.square => string

Empty Square.

server

Settings For The .serve Command.

serevr.port => number

Port For The HTTP Server.

server.pass.color => string

(WIP - Not Used In The Code) Password For The Multiplayer Server.

Todo

  • [X] Custom Chess Engine
  • [ ] (Almost Done) Multiplayer

Tested

Tested OS:

  • Linux (Arch)
  • Android (Termux) // Bot Wont Work