PHPackages                             mkuettel/htfx - 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. [Templating &amp; Views](/categories/templating)
4. /
5. mkuettel/htfx

ActiveLibrary[Templating &amp; Views](/categories/templating)

mkuettel/htfx
=============

Declarative streaming templating engine for PHP 8

00PHP

Since Jun 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mkuettel/htfx)[ Packagist](https://packagist.org/packages/mkuettel/htfx)[ RSS](/packages/mkuettel-htfx/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

htfx
====

[](#htfx)

[![pipeline status](https://camo.githubusercontent.com/a8b740477f5dc4d69efac7a0dd6abdd88051be4b2f202d31d018e91d96e8a880/68747470733a2f2f6769746c61622e686f73746d61782e63682f6b75657474656c2d696e666f726d6174696b2f687466782f6261646765732f6d61696e2f706970656c696e652e737667)](https://gitlab.hostmax.ch/kuettel-informatik/htfx/-/commits/main) [![Latest Release](https://camo.githubusercontent.com/77d3a3ae792653588699d6abd58022b41437f51f5066a664b60d30de84e13252/68747470733a2f2f6769746c61622e686f73746d61782e63682f6d6b752f687466782f2d2f6261646765732f72656c656173652e737667)](https://gitlab.hostmax.ch/mku/htfx/-/releases) [![coverage report](https://camo.githubusercontent.com/8e57e2d2cc57e5359a0c0b73364e56d6b07896d948aa04b6634fc1b701a33953/68747470733a2f2f6769746c61622e686f73746d61782e63682f6d6b752f687466782f6261646765732f6d61696e2f636f7665726167652e737667)](https://gitlab.hostmax.ch/kuettel-informatik/htfx/-/commits/main)

Declarative Hypertext Template Engine for PHP.

Features
--------

[](#features)

- Decorate your html to suit your needs
- Partials, Layouts
- Extensibility, Customization
- Streaming of Tokens for rendering
- more coming...

Roadmap
-------

[](#roadmap)

- implement fibers or passing lazy functions to, to allow for rendering template as soon as possible

Installation
------------

[](#installation)

Clone this repository. Once you've navigated into the just cloned directory you'll first need to install all the dependencies using composer. (If you can't simply install composer on your machine there is a composer.phar file available)

```
composer install

```

(Note: use `composer install --no-dev` when deploying, preventing the installing of dev tools)

Then to configure the application to your computing environment you can copy the `env` file at the root folder of this repository and adjust the `.env` file like this:

```
cp env .env
$EDITOR .env

```

Development
-----------

[](#development)

### Configuration

[](#configuration)

First, if you plan to develop this software, you'll probably want to set `FX_ENVIRONMENT=development` variable in your `.env` file to development.

Support
-------

[](#support)

Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.

Roadmap
-------

[](#roadmap-1)

If you have ideas for releases in the future, it is a good idea to list them in the README.

- more modules based upon this repo will follow

### Repo management

[](#repo-management)

- [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
- [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [Set auto-merge](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)

Contributing
------------

[](#contributing)

State if you are open to contributions and what your requirements are for accepting them.

For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.

You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.

Authors and acknowledgment
--------------------------

[](#authors-and-acknowledgment)

- Development: Moritz Küttel [moritz\_kuettel+htfx\_readme@fastmail.com](mailto:moritz_kuettel+htfx_readme@fastmail.com), Küttel Informatik [moritz\_kuettel+hostmax\_website@fastmail.com](mailto:moritz_kuettel+hostmax_website@fastmail.com)

License
-------

[](#license)

Lesser GNU General Public License version 3 or later. See the file `COPYING`.

Copyright © by Moritz Küttel

Project status
--------------

[](#project-status)

Beta, Unfinished

###  Health Score

13

—

LowBetter than 1% of packages

Maintenance26

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

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.

### Community

Maintainers

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

### Embed Badge

![Health badge](/badges/mkuettel-htfx/health.svg)

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

###  Alternatives

[mustache/mustache

A Mustache implementation in PHP.

3.3k44.6M291](/packages/mustache-mustache)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)[whitecube/nova-flexible-content

Flexible Content &amp; Repeater Fields for Laravel Nova.

8053.0M25](/packages/whitecube-nova-flexible-content)[mopa/bootstrap-bundle

Easy integration of twitters bootstrap into symfony2

7042.9M33](/packages/mopa-bootstrap-bundle)[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3871.2M](/packages/limenius-react-bundle)[nicmart/string-template

StringTemplate is a very simple string template engine for php. I've written it to have a thing like sprintf, but with named and nested substutions.

2101.7M30](/packages/nicmart-string-template)

PHPackages © 2026

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