{"id":13937267,"url":"https://github.com/marcusbuffett/command-line-chess","last_synced_at":"2025-05-16T02:09:59.182Z","repository":{"id":22533763,"uuid":"25874460","full_name":"marcusbuffett/command-line-chess","owner":"marcusbuffett","description":"A python program to play chess against an AI in the terminal.","archived":false,"fork":false,"pushed_at":"2024-05-29T21:21:28.000Z","size":221,"stargazers_count":511,"open_issues_count":11,"forks_count":168,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-05-09T03:01:44.540Z","etag":null,"topics":["chess","hacktoberfest","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcusbuffett.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"marcusbuffett"}},"created_at":"2014-10-28T14:51:57.000Z","updated_at":"2025-04-28T05:54:53.000Z","dependencies_parsed_at":"2024-01-07T18:17:49.059Z","dependency_job_id":"53aeb7a1-dc2a-40d2-b1f9-5be1a6e1212b","html_url":"https://github.com/marcusbuffett/command-line-chess","commit_stats":{"total_commits":93,"total_committers":21,"mean_commits":4.428571428571429,"dds":0.4946236559139785,"last_synced_commit":"38c47d459656accc4d5443df8e46fa581f498b58"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fcommand-line-chess","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fcommand-line-chess/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fcommand-line-chess/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcusbuffett%2Fcommand-line-chess/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcusbuffett","download_url":"https://codeload.github.com/marcusbuffett/command-line-chess/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453667,"owners_count":22073618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chess","hacktoberfest","python"],"created_at":"2024-08-07T23:03:26.791Z","updated_at":"2025-05-16T02:09:59.166Z","avatar_url":"https://github.com/marcusbuffett.png","language":"Python","readme":"[![Run on Repl.it](https://repl.it/badge/github/marcusbuffett/command-line-chess)](https://repl.it/github/marcusbuffett/command-line-chess)\n\n# command-line-chess\n\n[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/marcusbuffett/command-line-chess/graphs/commit-activity)\n[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![PyPI download month](https://img.shields.io/pypi/dm/cl-chess.svg)](https://pypi.python.org/project/cl-chess/)\n[![PyPi version](https://badgen.net/pypi/v/cl-chess/)](https://pypi.org/project/cl-chess)\n[![GitHub issues](https://img.shields.io/github/issues/marcusbuffett/command-line-chess.svg)](https://GitHub.com/marcusbuffett/command-line-chess/issues/)\n[![GitHub watchers](https://img.shields.io/github/watchers/marcusbuffett/command-line-chess.svg?style=social\u0026label=Watch\u0026maxAge=2592000)](https://github.com/marcusbuffett/command-line-chess)\n[![GitHub stars](https://img.shields.io/github/stars/marcusbuffett/command-line-chess.svg?style=social\u0026label=Star\u0026maxAge=2592000)](https://github.com/marcusbuffett/command-line-chess)\n\n\nA python program to play chess against an AI in the terminal.\n\nAlso check out my other project, a [chess training site](https://chessmadra.com/).\n\n## Features\n\n- Play chess against an AI in the terminal\n- Two player mode (run `chess --two` to enter)\n- possible commands:\n    * `a3`, `Nc3`, `Qxa`, etc: make a move\n    * `l`: prints every legal move\n    * `r`: make a random move\n    * `u`: undo your last move\n    * `quit`: resign the current game\n    * `gm`: prints moves of current game in PGN format\n    * `?`: help, prints all available commands\n\n## Screenshots\nInitial State:\n\n![Initial](https://i.imgur.com/PSS7csc.png)\n\nFirst move:\n\n![First move](https://i.imgur.com/AsXhhvC.png)\n\n## Installation\n\n### Install from [PyPI](https://pypi.org/project/cl-chess/)\nJust run the following command:\n\n```\npip install cl-chess\n```\n\n### Install from source\n- First clone the repository:\n```\ngit clone https://github.com/marcusbuffett/command-line-chess\n```\n- navigate into the newly created `command-line-chess` directory and run:\n```\npip install .\n```\n## Usage\n\n```sh\nchess -h        # to see all possible options\n```\n```\nusage: chess [-h] [-t] [-w W] [-b B] [-c]\n\nA python program to play chess against an AI in the terminal.\n\noptional arguments:\n  -h, --help       show this help message and exit\n  -t, --two        to play a 2-player game (default: False)\n  -w W, --white W  color for white player (default: white)\n  -b B, --black B  color for black player (default: black)\n  -c, --checkered  use checkered theme for the chess board (default: False)\n\nEnjoy the game!\n\n```\n\n## Contributing\n\nContributions are always welcome!\n\nSee `CONTRIBUTING.md`for ways to get started.\n\nPlease adhere to this project's `CODE-OF-CONDUCT.md`.\n\n\n## LICENSE\nTake a look at the [LICENSE](https://github.com/marcusbuffett/command-line-chess/LICENSE) file\n\n## Authors\n\n- [@marcusbuffett](https://www.github.com/marcusbuffett)\n- [@ClasherKasten](https://www.github.com/ClasherKasten)\n\n\n## Questions, bugs, etc.\nPlease create an issue.\n\n## Technical stuff\n\nThe AI is a simple brute-force AI with no pruning. It evaluates a given position by counting the value of the pieces for each side (pawn -\u003e 1, knight/bishop -\u003e 3, rook -\u003e 5, queen -\u003e 9). It will evaluate the tree of moves, and take the path that results in the greatest gain. To learn more, check out [my post on how it works](https://mbuffett.com/posts/chess-ai/).\n","funding_links":["https://github.com/sponsors/marcusbuffett"],"categories":["Python","Projects"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusbuffett%2Fcommand-line-chess","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcusbuffett%2Fcommand-line-chess","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcusbuffett%2Fcommand-line-chess/lists"}