{"id":22211981,"url":"https://github.com/mcountryman/uci-parser-ts","last_synced_at":"2026-04-28T18:01:19.242Z","repository":{"id":57818989,"uuid":"527090472","full_name":"mcountryman/uci-parser-ts","owner":"mcountryman","description":"A UCI parser written in Typescript.","archived":false,"fork":false,"pushed_at":"2022-08-22T20:40:28.000Z","size":545,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-15T04:06:54.610Z","etag":null,"topics":["chess","nodejs","typescript","uci"],"latest_commit_sha":null,"homepage":"https://mcountryman.github.io/uci-parser-ts","language":"TypeScript","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/mcountryman.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-08-21T02:54:09.000Z","updated_at":"2024-05-25T08:28:18.000Z","dependencies_parsed_at":"2022-09-03T09:11:15.193Z","dependency_job_id":null,"html_url":"https://github.com/mcountryman/uci-parser-ts","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcountryman%2Fuci-parser-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcountryman%2Fuci-parser-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcountryman%2Fuci-parser-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mcountryman%2Fuci-parser-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mcountryman","download_url":"https://codeload.github.com/mcountryman/uci-parser-ts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245407777,"owners_count":20610234,"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","nodejs","typescript","uci"],"created_at":"2024-12-02T20:46:16.762Z","updated_at":"2026-04-28T18:01:14.222Z","avatar_url":"https://github.com/mcountryman.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# uci-parser-ts\n\n![npm](https://img.shields.io/npm/v/uci-parser-ts?style=for-the-badge) ![npm bundle size](https://img.shields.io/bundlephobia/minzip/uci-parser-ts?style=for-the-badge) ![Codecov](https://img.shields.io/codecov/c/github/mcountryman/uci-parser-ts?style=for-the-badge)\n\nA [UCI](https://en.wikipedia.org/wiki/Universal_Chess_Interface) parser written in TypeScript.\n\n## install\n\nnpm\n\n```bash\nnpm i uci-parser-ts\n```\n\nyarn\n\n```bash\nyarn add uci-parser-ts\n```\n\npnpm\n\n```bash\npnpm i uci-parser-ts\n```\n\ncdn\n\n- production: https://unpkg.com/uci-parser-ts@latest/umd/uci-parser-ts.production.js\n- development: https://unpkg.com/uci-parser-ts@latest/umd/uci-parser-ts.development.js\n\n## examples\n\n\u003e [stockfish.ts](examples/src/stockfish.ts)\n\n```typescript\nimport { spawn } from \"child_process\";\nimport { createInterface } from \"readline\";\nimport { tryParseOne, UciOkCommand } from \"uci-parser-ts\";\n\n/**\n * Spawns a Stockfish process and initializes the UCI mode.\n */\nasync function main() {\n  const { stdin, stdout } = spawn(\"stockfish\");\n  const lines = createInterface({ input: stdout });\n\n  stdin.write(\"uci\");\n  stdin.end();\n\n  for await (const line of lines) {\n    const command = tryParseOne(line);\n    if (!command) {\n      continue;\n    }\n\n    if (command instanceof UciOkCommand) {\n      break;\n    }\n  }\n}\n\nvoid main();\n```\n\n\u003e [cdn.html](examples/src/cdn.html)\n\n```html\n\u003chtml\u003e\n  \u003cbody\u003e\n    \u003cscript src=\"https://unpkg.com/uci-parser-ts@latest/umd/uci-parser-ts.production.js\"\u003e\u003c/script\u003e\n    \u003cscript\u003e\n      alert(JSON.stringify(uci.parseOne(\"bestmove e2e4\")));\n    \u003c/script\u003e\n  \u003c/body\u003e\n\u003c/html\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcountryman%2Fuci-parser-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmcountryman%2Fuci-parser-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmcountryman%2Fuci-parser-ts/lists"}