Skip to main content

CMD Chess Game ♟️

      __   __   __
    /   \/   \/   \
   | v   v   v   v |
    \  \   .   /  /
     \__\_/_\_/__/
     |           |
     |( ) ( ) ( )|
     |___________|
          ___
         (   )
          ) (
         /   \
        (     )
         )   (
        /     \
       (_______)

A lightweight, cross-platform terminal-based chess game written in Python. Play against a positional AI right in your command line!

Features

  • Cross-Platform: Automatic rendering for Windows (ASCII/Unicode) and Linux/macOS.
  • Smart AI: An integrated chess bot with positional evaluation.
  • Input Validation: Robust error handling for illegal moves and non-numeric menu inputs.
  • Easy Installation: Fully compatible with pip and PyPI.
  • Save/Load System: Support for saving your game state to resume later.

Installation

Install via pip:

You can install the game directly from PyPI. Ensure you have Python 3.10 or higher installed.

  1. Install the package:
pip install cmd-game-chess
  1. Run the game:
play-chess

Note: If the command play-chess is not found, use python -m cmd_chess.chess.*

Run from Source:

If you want to contribute or modify the code:

  1. Clone the repository:
git clone https://github.com/Danil-gtj/cmd-chess.git
cd cmd-chess
  1. Launch the script:
python src/cmd_chess/chess.py

Arch Linux (AUR):

For Arch Linux users, the package is available in the AUR:

yay -S python-cmd-game-chess

How to Play

Menu Controls:

Enter the corresponding number to navigate:

  • 1 — Start Play: Enter the match against the AI.
  • 2 — Save Game: Save your current board state.
  • 3 — Load Game: Resume from your last save.
  • 4 — Toggle Graphics: Switch between Unicode icons and ASCII letters (useful if figures appear as squares).
  • 0 — Exit: Close the application.

In-Game Commands:

  • Move pieces using standard coordinates (e.g., A2 to A4).
  • Type EXIT at any time during your turn to return to the main menu.

Technical Details:

  • Dependencies: None (Uses Python Standard Library only).
  • Architecture: Modular structure with dedicated logic for piece movement, AI evaluation, and state persistence.

Metadata

Release files for cmd-game-chess 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmd-game-chess 0.1.5
File Size Uploaded Provenance Actions
cmd_game_chess-0.1.5.tar.gz 9.8 kB Without provenance Details for cmd_game_chess-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for cmd-game-chess 0.1.5
File Interpreter ABI Platform Actions
cmd_game_chess-0.1.5-py3-none-any.whl Python 3 none any Details for cmd_game_chess-0.1.5-py3-none-any.whl

Total release size: 20.2 kB

Release files / cmd_game_chess-0.1.5.tar.gz

Download URL cmd_game_chess-0.1.5.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
4f4b7610bede21eb5f96704d45730d35b6fad88bc5d90b902e4451d5efb39434
BLAKE2b-256 checksum
How to use checksums
2d1e151a1411ab8e0f973b4722c338108447b7f93c4c4fb64af2ae7e7dd79dd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / cmd_game_chess-0.1.5-py3-none-any.whl

Download URL cmd_game_chess-0.1.5-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4038b4b83c40b995d040d18a3fd9c4fbc490ac23dc9d419730cd95e2b70f8388
BLAKE2b-256 checksum
How to use checksums
4c0e99ff625b38eae5d781b370d38f12cc85f251adbffec90b9f70315a1a5cb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Security for cmd-game-chess 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page