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)50611517[13 issues](https://github.com/skoro/php-tkui/issues)[1 PRs](https://github.com/skoro/php-tkui/pulls)MITPHPPHP &gt;=7.4

Since Oct 22Pushed 2y ago20 watchersCompare

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

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

29

—

LowBetter than 59% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 99.6% 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

1167d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c0d06add7732fb2b4681e95a92527bb7e0dd913fe790fd0c5dc774cf52d3f2b7?d=identicon)[skoro](/maintainers/skoro)

---

Top Contributors

[![skoro](https://avatars.githubusercontent.com/u/6389201?v=4)](https://github.com/skoro "skoro (735 commits)")[![mtk3d](https://avatars.githubusercontent.com/u/12657846?v=4)](https://github.com/mtk3d "mtk3d (2 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

[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[drsdre/yii2-wizardwidget

Multi step wizard widget using tabs to guide a user through steps to complete a task. Based on the Form wizard (using tabs) from lukepzak (see http://bootsnipp.com/snippets/featured/form-wizard-using-tabs).

37147.9k](/packages/drsdre-yii2-wizardwidget)[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)
