PHPackages                             skoro/tkui - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. skoro/tkui

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

skoro/tkui
==========

Create desktop applications using Tk gui toolkit

v0.2.3(3y ago)50911517[14 issues](https://github.com/skoro/php-tkui/issues)MITPHPPHP &gt;=7.4

Since Oct 22Pushed 2mo ago19 watchersCompare

[ Source](https://github.com/skoro/php-tkui)[ Packagist](https://packagist.org/packages/skoro/tkui)[ RSS](/packages/skoro-tkui/feed)WikiDiscussions master Synced today

READMEChangelog (7)Dependencies (6)Versions (8)Used By (0)

 [![](logo.png)](logo.png)

php-tkui
--------

[](#php-tkui)

`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.

[![](screen-demo-buttons-win.png)](screen-demo-buttons-win.png)

### Requirements

[](#requirements)

- PHP &gt;= 8.2
- `ffi` extension must be enabled
- Tcl/Tk &gt;= 8.6

### Getting started

[](#getting-started)

Make sure that Tcl/Tk is installed in your OS. For Debian/Ubuntu based distros you may install it with `apt`:

```
sudo apt install tcl tk
```

Next, check `FFI` extension is enabled:

```
php --ri ffi
```

Clone this repository and try out the demos:

```
git clone https://github.com/skoro/php-tkui.git php-tkui
cd php-tkui
composer install
php demos/buttons.php
```

### Configuration

[](#configuration)

You may enable some application features like:

- debug mode
- appearance

Copy the provided `.env.example` into `.env` and customize the options.

Debug mode allows you to find out which commands are executed by Tcl engine. To enable the debug mode set:

```
DEBUG=true
DEBUG_LOG=php://stdout
```

All the debug messages will go to the console. You may specify a file name instead of console.

To change the application appearance comment out `THEME` option and set one of: *clam*, *alt*, *default*, *classic*. Additional themes for Windows: *winnative*, *xpnative*, *vista*. By default, *auto* is used, setting a theme depending on OS:

```
THEME=auto
```

### Windows

[](#windows)

You need to install one of [Tcl/Tk binary distributions](https://wiki.tcl-lang.org/page/Binary+Distributions) and set path to dlls in `.env` file like this:

```
WINDOWS_LIB_TCL=c:\\tcltk\\bin\\tcl86t.dll
WINDOWS_LIB_TK=c:\\tcltk\\bin\\tk86t.dll

```

Also, you can build your own Tcl/Tk distribution, take a look at [BUILD-WIN.md](tools/BUILD-WIN.md) doc how to do that.

### macOS

[](#macos)

You need to install one of Tcl/Tk binary distributions same as for Windows. The easiest way is to install it using brew:

```
brew install tcl-tk
```

Then you need to set paths to dylibs in `.env` file:

```
DARWIN_LIB_TCL=/usr/local/Cellar/tcl-tk/[installed_version]/lib/libtcl8.6.dylib
DARWIN_LIB_TK=/usr/local/Cellar/tcl-tk/[installed_version]/lib/libtk8.6.dylib

```

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance58

Moderate activity, may be stable

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~22 days

Recently: every ~31 days

Total

7

Last Release

1214d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6389201?v=4)[Oleksii Skorobogatko](/maintainers/skoro)[@skoro](https://github.com/skoro)

---

Top Contributors

[![skoro](https://avatars.githubusercontent.com/u/6389201?v=4)](https://github.com/skoro "skoro (736 commits)")[![mtk3d](https://avatars.githubusercontent.com/u/12657846?v=4)](https://github.com/mtk3d "mtk3d (2 commits)")[![CViniciusSDias](https://avatars.githubusercontent.com/u/6991415?v=4)](https://github.com/CViniciusSDias "CViniciusSDias (1 commits)")[![jawira](https://avatars.githubusercontent.com/u/496541?v=4)](https://github.com/jawira "jawira (1 commits)")

---

Tags

desktopffiguiphpphp-ffiphp-libraryphp74php8tcltcltkuiguidesktopwidgettoolkitTktcltk

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/skoro-tkui/health.svg)

```
[![Health](https://phpackages.com/badges/skoro-tkui/health.svg)](https://phpackages.com/packages/skoro-tkui)
```

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.7k38.9k](/packages/matomo-matomo)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

85036.3k](/packages/flow-php-flow)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
