{"id":13404847,"url":"https://github.com/skoro/php-tkui","last_synced_at":"2025-04-13T07:48:37.756Z","repository":{"id":44954111,"uuid":"398833822","full_name":"skoro/php-tkui","owner":"skoro","description":"Build native desktop applications with PHP only","archived":false,"fork":false,"pushed_at":"2024-03-16T18:35:45.000Z","size":6838,"stargazers_count":495,"open_issues_count":13,"forks_count":18,"subscribers_count":20,"default_branch":"master","last_synced_at":"2025-04-13T07:48:33.203Z","etag":null,"topics":["desktop","ffi","gui","php","php-ffi","php-library","php74","php8","tcl","tcltk"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skoro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"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}},"created_at":"2021-08-22T15:29:45.000Z","updated_at":"2025-04-12T19:39:33.000Z","dependencies_parsed_at":"2024-01-07T16:32:17.167Z","dependency_job_id":"69c51577-918e-472f-9dd6-45e9ce327cc7","html_url":"https://github.com/skoro/php-tkui","commit_stats":{"total_commits":603,"total_committers":3,"mean_commits":201.0,"dds":0.01990049751243783,"last_synced_commit":"ed2199cfa524c9142f0d9769613e709a1592e901"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoro%2Fphp-tkui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoro%2Fphp-tkui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoro%2Fphp-tkui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skoro%2Fphp-tkui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skoro","download_url":"https://codeload.github.com/skoro/php-tkui/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248681494,"owners_count":21144700,"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":["desktop","ffi","gui","php","php-ffi","php-library","php74","php8","tcl","tcltk"],"created_at":"2024-07-30T19:01:52.233Z","updated_at":"2025-04-13T07:48:37.724Z","avatar_url":"https://github.com/skoro.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"logo.png\" width=\"280\" height=\"160\"\u003e\n\u003c/p\u003e\n\n## php-tkui\n\n`php-tkui` allows you to build desktop ui applications with PHP only. It leverages [FFI](https://www.php.net/manual/en/book.ffi) extension and [Tcl/Tk](https://www.tcl.tk) for that, thus you don't need to compile or install any external extensions.\n\n\u003cp align=\"center\"\u003e\u003cimg src=\"screen-demo-buttons-win.png\"\u003e\u003c/p\u003e\n\n### Requirements\n\n* PHP \u003e= 8.2\n* `ffi` extension must be enabled\n* Tcl/Tk \u003e= 8.6\n\n### Getting started\n\nMake sure that Tcl/Tk is installed in your OS. For Debian/Ubuntu based distros you may install it with `apt`:\n```sh\nsudo apt install tcl tk\n```\nNext, check `FFI` extension is enabled:\n```sh\nphp --ri ffi\n```\n\nClone this repository and try out the demos:\n```sh\ngit clone https://github.com/skoro/php-tkui.git php-tkui\ncd php-tkui\ncomposer install\nphp demos/buttons.php\n```\n\n### Configuration\n\nYou may enable some application features like:\n- debug mode\n- appearance\n\nCopy the provided `.env.example` into `.env` and customize the options.\n\nDebug mode allows you to find out which commands are executed by Tcl engine. To enable\nthe debug mode set:\n```env\nDEBUG=true\nDEBUG_LOG=php://stdout\n```\nAll the debug messages will go to the console. You may specify a file name instead of console.\n\nTo change the application appearance comment out `THEME` option and set one of:\n_clam_, _alt_, _default_, _classic_.  Additional themes for Windows: _winnative_, _xpnative_, _vista_.\nBy default, _auto_ is used, setting a theme depending on OS:\n```env\nTHEME=auto\n```\n\n### Windows\n\nYou need to install one of [Tcl/Tk binary distributions](https://wiki.tcl-lang.org/page/Binary+Distributions) and set path to dlls\nin `.env` file like this:\n\n```\nWINDOWS_LIB_TCL=c:\\\\tcltk\\\\bin\\\\tcl86t.dll\nWINDOWS_LIB_TK=c:\\\\tcltk\\\\bin\\\\tk86t.dll\n```\n\nAlso, you can build your own Tcl/Tk distribution, take a look at [BUILD-WIN.md](tools/BUILD-WIN.md) doc how to do that.\n\n### macOS\n\nYou need to install one of Tcl/Tk binary distributions same as for Windows.\nThe easiest way is to install it using brew:\n\n```sh\nbrew install tcl-tk\n```\n\nThen you need to set paths to dylibs in `.env` file:\n\n```\nDARWIN_LIB_TCL=/usr/local/Cellar/tcl-tk/[installed_version]/lib/libtcl8.6.dylib\nDARWIN_LIB_TK=/usr/local/Cellar/tcl-tk/[installed_version]/lib/libtk8.6.dylib\n```\n","funding_links":[],"categories":["PHP","👓 Alternatives to the [Electron.js](https://electronjs.org) ⚛"],"sub_categories":["PHP"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskoro%2Fphp-tkui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskoro%2Fphp-tkui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskoro%2Fphp-tkui/lists"}