{"id":17084426,"url":"https://github.com/niklasf/chessops","last_synced_at":"2025-05-16T04:06:42.861Z","repository":{"id":36074815,"uuid":"202898952","full_name":"niklasf/chessops","owner":"niklasf","description":"Chess and chess variant rules and operations in TypeScript","archived":false,"fork":false,"pushed_at":"2025-04-09T17:15:30.000Z","size":1754,"stargazers_count":133,"open_issues_count":6,"forks_count":38,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-05-16T04:06:36.562Z","etag":null,"topics":["chess","fen","lichess","typescript"],"latest_commit_sha":null,"homepage":"https://niklasf.github.io/chessops/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/niklasf.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"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,"zenodo":null},"funding":{"github":"niklasf"}},"created_at":"2019-08-17T15:34:24.000Z","updated_at":"2025-05-03T09:22:34.000Z","dependencies_parsed_at":"2023-02-18T19:15:41.606Z","dependency_job_id":"19f7a68f-ae1f-4f5e-87c2-66e605601698","html_url":"https://github.com/niklasf/chessops","commit_stats":{"total_commits":880,"total_committers":15,"mean_commits":"58.666666666666664","dds":"0.036363636363636376","last_synced_commit":"9de4c440ec44b7406cde1ba39b045f42d0d2d903"},"previous_names":[],"tags_count":45,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fchessops","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fchessops/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fchessops/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niklasf%2Fchessops/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niklasf","download_url":"https://codeload.github.com/niklasf/chessops/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254464896,"owners_count":22075570,"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","fen","lichess","typescript"],"created_at":"2024-10-14T13:07:07.827Z","updated_at":"2025-05-16T04:06:37.851Z","avatar_url":"https://github.com/niklasf.png","language":"TypeScript","funding_links":["https://github.com/sponsors/niklasf"],"categories":[],"sub_categories":[],"readme":"# chessops\n\n[![Test](https://github.com/niklasf/chessops/workflows/Test/badge.svg)](https://github.com/niklasf/chessops/actions)\n[![npm](https://img.shields.io/npm/v/chessops)](https://www.npmjs.com/package/chessops)\n\nChess and chess variant rules and operations in TypeScript.\n\n## Documentation\n\n[View TypeDoc](https://niklasf.github.io/chessops/)\n\n## Features\n\n- [Read and write FEN](https://niklasf.github.io/chessops/modules/fen.html)\n- Vocabulary\n  - `Square`\n  - `SquareSet` (implemented as bitboards)\n  - `Color`\n  - `Role` (piece type)\n  - `Piece` (`Role` and `Color`)\n  - `Board` (map of piece positions)\n  - `Castles`\n  - `Setup` (a not necessarily legal position)\n  - `Position` (base class for legal positions, `Chess` is a concrete implementation)\n- [Variant rules](https://niklasf.github.io/chessops/modules/variant.html):\n  Standard chess, Crazyhouse, King of the Hill, Three-check,\n  Antichess, Atomic, Horde, Racing Kings\n  - Move making\n  - Legal move and drop move generation\n  - Game end and outcome\n  - Insufficient material\n  - Setup validation\n- Supports Chess960\n- [Attacks and rays](https://niklasf.github.io/chessops/modules/attacks.html)\n  using Hyperbola Quintessence (faster to initialize than Magic Bitboards)\n- Read and write UCI move notation\n- [Read and write SAN](https://niklasf.github.io/chessops/modules/san.html)\n- [Read and write PGN](https://niklasf.github.io/chessops/modules/pgn.html)\n  - Parser supports asynchronous streaming\n  - Game tree model\n  - Transform game tree to augment nodes with arbitrary user data\n  - Parse comments with evaluations, clocks and shapes\n- [Transformations](https://niklasf.github.io/chessops/modules/transform.html): Mirroring and rotating\n- [Compatibility](https://niklasf.github.io/chessops/modules/compat.html):\n  [chessground](https://github.com/ornicar/chessground) and\n  [scalachess](https://github.com/ornicar/scalachess)\n\n## Example\n\n```javascript\nimport { Chess } from 'chessops/chess';\nimport { parseFen } from 'chessops/fen';\n\nconst setup = parseFen('r1bqkbnr/ppp2Qpp/2np4/4p3/2B1P3/8/PPPP1PPP/RNB1K1NR b KQkq - 0 4').unwrap();\nconst pos = Chess.fromSetup(setup).unwrap();\nconsole.assert(pos.isCheckmate());\n```\n\n## License\n\nchessops is licensed under the GNU General Public License 3 or any later\nversion at your choice. See LICENSE.txt for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasf%2Fchessops","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniklasf%2Fchessops","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniklasf%2Fchessops/lists"}