{"id":23562023,"url":"https://github.com/slice/capstone","last_synced_at":"2025-11-01T19:30:24.279Z","repository":{"id":268223247,"uuid":"903667141","full_name":"slice/capstone","owner":"slice","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-16T08:34:13.000Z","size":93,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-26T16:14:41.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/slice.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}},"created_at":"2024-12-15T08:20:30.000Z","updated_at":"2024-12-23T22:01:35.000Z","dependencies_parsed_at":"2024-12-15T10:31:46.948Z","dependency_job_id":"1fdc2359-9523-4064-8561-4b2b6a4269c6","html_url":"https://github.com/slice/capstone","commit_stats":null,"previous_names":["slice/capstone"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fcapstone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fcapstone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fcapstone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slice%2Fcapstone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slice","download_url":"https://codeload.github.com/slice/capstone/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239318929,"owners_count":19619499,"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":[],"created_at":"2024-12-26T16:14:42.257Z","updated_at":"2025-11-01T19:30:24.225Z","avatar_url":"https://github.com/slice.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# capstone\n\n\u003e [!WARNING]\n\u003e Work in progress. Not ready for production use. Caveat emptor, etc. etc.\n\n\u003cimg src='https://b2.skip.lol/capstone4.png' align='right' width='35%' /\u003e\n\ncapstone is a [React] renderer for [AppKit] that lets you create\nnative macOS apps using JavaScript.\n\nWhen you use capstone, your code runs inside of the [Open Scripting\nArchitecture][osa] via [JavaScriptCore][jsc], which is shared with the onboard\ninstallation of Safari on the system. capstone abstracts over the [Objective-C\nbridge][bridge], directly interacting with system frameworks from JavaScript.\n\n\u003cbr clear=\"right\"/\u003e\n\n[react]: https://react.dev\n[appkit]: https://developer.apple.com/documentation/appkit\n[jsc]: https://developer.apple.com/documentation/javascriptcore?language=objc\n[bridge]: https://developer.apple.com/library/archive/releasenotes/InterapplicationCommunication/RN-JavaScriptForAutomation/Articles/OSX10-10.html#//apple_ref/doc/uid/TP40014508-CH109-SW17\n[osa]: https://developer.apple.com/library/archive/documentation/LanguagesUtilities/Conceptual/MacAutomationScriptingGuide/HowMacScriptingWorks.html\n\n```tsx\nimport {run, useConstraints} from 'capstone';\nimport {useReducer} from 'react';\n\nfunction App() {\n  const [count, increment] = useReducer((num) =\u003e num + 1, 0);\n\n  function handleClick() {\n    console.log(':3');\n    increment();\n  }\n\n  const views = useConstraints(({gte}) =\u003e ({\n    container: {width: gte(300), height: gte(200)},\n    button: {},\n  }));\n\n  return (\n    \u003cwindow title='hello, capstone'\u003e\n      \u003cview ref={views.container}\u003e\n        \u003cbutton ref={views.button} onClick={handleClick}\u003e\n          {String(count)}\n        \u003c/button\u003e\n      \u003c/view\u003e\n\n      \u003cconstraint let={views.button.centerX} eq={views.container.centerX} /\u003e\n      \u003cconstraint let={views.button.centerY} eq={views.container.centerY} /\u003e\n    \u003c/window\u003e\n  );\n}\n\nrun(\u003cApp /\u003e);\n```\n\nA manual bridge implementation written in [Rust] or [Swift] is being considered.\n\n[rust]: https://www.rust-lang.org\n[swift]: https://www.swift.org\n\nHot reloading with [Fast Refresh][fast-refresh] and use of [Vite's environment\nAPI][vite-envs] are planned.\n\n[vite-envs]: https://vite.dev/guide/api-environment\n[fast-refresh]: https://reactnative.dev/docs/fast-refresh\n\n## idc that it's unstable, i wanna use it\n\nIf you have [Nix] installed, then the included [flake] exposes a `devShell` for\nyou. Otherwise, install [pnpm] yourself, and run:\n\n```\npnpm test\n```\n\n[pnpm]: https://pnpm.io\n[flake]: https://wiki.nixos.org/wiki/Flakes\n[nix]: https://nixos.org\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslice%2Fcapstone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslice%2Fcapstone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslice%2Fcapstone/lists"}