{"id":46421541,"url":"https://github.com/crankscript/crankscript","last_synced_at":"2026-05-10T01:27:51.484Z","repository":{"id":259308447,"uuid":"857905714","full_name":"crankscript/crankscript","owner":"crankscript","description":"Write Playdate games in TypeScript","archived":false,"fork":false,"pushed_at":"2025-11-27T21:10:11.000Z","size":2255,"stargazers_count":22,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T11:41:41.052Z","etag":null,"topics":["playdate","playdate-console","playdate-sdk","typescript"],"latest_commit_sha":null,"homepage":"","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/crankscript.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-09-15T22:53:33.000Z","updated_at":"2025-11-27T21:05:37.000Z","dependencies_parsed_at":"2024-10-24T08:45:51.615Z","dependency_job_id":"32cfff52-fa0f-487c-809b-7edaafc7b6c4","html_url":"https://github.com/crankscript/crankscript","commit_stats":null,"previous_names":["crankscript/crankscript"],"tags_count":171,"template":false,"template_full_name":null,"purl":"pkg:github/crankscript/crankscript","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crankscript%2Fcrankscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crankscript%2Fcrankscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crankscript%2Fcrankscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crankscript%2Fcrankscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crankscript","download_url":"https://codeload.github.com/crankscript/crankscript/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crankscript%2Fcrankscript/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30134575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T15:35:27.018Z","status":"ssl_error","status_checked_at":"2026-03-05T15:35:23.768Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["playdate","playdate-console","playdate-sdk","typescript"],"created_at":"2026-03-05T16:03:13.011Z","updated_at":"2026-03-05T16:03:13.994Z","avatar_url":"https://github.com/crankscript.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eCrankScript\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/crankscript/crankscript/actions/workflows/ci.yml/badge.svg\" alt=\"CI\"\u003e\n  \u003cimg src=\"https://img.shields.io/npm/v/crankscript.svg\" alt=\"NPM version\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/SDK-3.0.1-FFC733\" alt=\"SDK\"\u003e\n\u003c/p\u003e\n\nCrankscript is a collection of tools that lets you write Playdate games in TypeScript. TypeScript code is enriched with Playdate type definitions, and transformed to Lua with [TypeScript-to-Lua](https://typescripttolua.github.io/).\n\n\u003e [!WARNING]\n\u003e This project is in an early development stage. The type definitions may be incomplete or incorrect. Please report any issues you encounter. Class transpilation is especially unstable at the moment; an improved test coverage is underway.\n\n\u003chttps://github.com/user-attachments/assets/ea667a8b-754b-4b79-8f9e-8fe608228ed9\u003e\n\n## Getting started\n\nThe `crankscript` cli application is the main entry point for using Crankscript. To create a new project, use the command:\n\n```sh\nnpx crankscript@latest new \u003cproject-name\u003e\n```\n\nOptionally, a template can be specified:\n\n```sh\nnpx crankscript@latest new \u003cproject-name\u003e --template \u003ctemplate-name\u003e\n```\n\nHowever, at the moment, only the \"blank\" template is available.\n\nAfter that, install all dependencies with:\n\n```sh\ncd \u003cproject-name\u003e\nnpm install\n```\n\nBuild the project and run it in the Playdate Simulator with:\n\n```sh\nnpm run simulator\n```\n\nThat's it!\n\n## A note about platform support\n\nA more detailed documentation is in progress. For now, here's an important note about platform support.\n\nThe `simulator` command supports `--watch`. In MacOS, when a change is detected, the simulator is launched again. This will not open a new simulator window, but will instead reload the game in the existing window.\n\nThis behavior is not supported in Linux or Windows, so a workaround is needed. In those platforms, it is possible to use the following command:\n\n```sh\nnpm run simulator -- --watch --recompile-only\n```\n\nThis will recompile the project when a change is detected, but the simulator will not be reopened. In order to see the changes, a reload must be triggered from the Lua side.\n\nThe package `@crankscript/core` provides a helper function which can do just that. It will check the latest modified time of \"main.pdz\" at regular intervals, and if a change is detected, it will reload the game using `playdate.file.run`.\n\nTo use the utility, simply wrap your update function with it.\n\n```ts\nimport { withReload } from '@crankscript/core';\n\nplaydate.update = withReload(\n    () =\u003e {\n        // Your update code here\n    },\n    {\n        // It is possible to specify the interval in milliseconds\n        interval: 1000, // this is the default interval\n    },\n);\n```\n\nPlease report any issues you encounter.\n\n## Credits and legal\n\n\u003e [!NOTE]\n\u003e Crankscript exists thanks to [this Playdate Dev Forum thread](https://devforum.play.date/t/playdate-sdk-with-typescript/). Special thanks to Andy for contributing the TypeScript-to-Lua plugin and the initial d.ts file, and to Orta for providing the require transformation code.\n\n\u003e [!NOTE]\n\u003e This repository uses a headless Playdate Simulator to run the Lua test suite.\n\u003e The CI configuration is based on the clever [workflow file](https://github.com/samdze/playdate-nim/blob/main/.github/workflows/build.yml) from\n\u003e [@samdze](https://github.com/samdze)'s [playdate-nim](https://github.com/samdze/playdate-nim).\n\n\u003e [!NOTE]\n\u003e Crankscript is not affiliated with Playdate or Panic Inc. in any way.\n\u003e The documentation excerpts present in this repository are owned by Panic Inc. and are provided here solely for reference\n\u003e within the context of Playdate game development. I do not claim ownership of any part of the documentation.\n\u003e\n\u003e If you are using this project, you must also comply with the Playdate SDK license, available at \u003chttps://play.date/dev/sdk-license/\u003e.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrankscript%2Fcrankscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrankscript%2Fcrankscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrankscript%2Fcrankscript/lists"}