PHPackages                             chemaclass/phel-flappybird - 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. [CLI &amp; Console](/categories/cli)
4. /
5. chemaclass/phel-flappybird

ActiveProject[CLI &amp; Console](/categories/cli)

chemaclass/phel-flappybird
==========================

Flappy Bird in your terminal — a CLI game written in Phel (Lisp on PHP).

v0.1.0(1mo ago)00MITShellPHP &gt;=8.4CI passing

Since Jun 14Pushed 1mo agoCompare

[ Source](https://github.com/Chemaclass/phel-flappybird)[ Packagist](https://packagist.org/packages/chemaclass/phel-flappybird)[ RSS](/packages/chemaclass-phel-flappybird/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

phel-flappybird
===============

[](#phel-flappybird)

A CLI **Flappy Bird** written in [Phel](https://phel-lang.org) (a Lisp that compiles to PHP). Flap through scrolling pipes in your terminal.

```
+----------------------------------------------------------+
|                                          ###             |
|                                          ###             |
|                                                          |
|        @                                                 |
|                                          ###             |
|                                          ###             |
+----------------------------------------------------------+
Score: 3     High: 7     (space/up = flap, q = quit)

```

Play
----

[](#play)

**From a release PHAR** (needs only PHP 8.4+):

```
# download phel-flappybird.phar from the Releases page, then:
php phel-flappybird.phar
```

**From source:**

```
composer install
composer dev          # run straight from source
# or compile an entry point and run it:
composer start        # = composer build && composer play
```

Controls
--------

[](#controls)

KeyAction`space` / `↑`flap`q`quit`r`replay (game over)Options
-------

[](#options)

Pass `key=value` arguments to tune the game:

```
php phel-flappybird.phar width=80 height=30 gap=8 gravity=0.25
```

OptionDefaultMeaning`width=N`60board width`height=N`22board height`gap=N`6pipe gap height`spacing=N`22columns between pipes`gravity=F`0.20downward acceleration / tick`flap=F`-0.95velocity applied on a flap`delay=N`90000tick delay in microseconds`debug`offphysics overlay`--version` and `--help` print info and exit.

Your best score is saved to `~/.phel-flappybird-highscore`.

Architecture
------------

[](#architecture)

Functional core / imperative shell:

- `src/core/physics.phel` — **pure**. The whole game is one immutable world map (`{:bird :pipes :score :dead?}`) advanced by a single `step` reducer. Randomness is injected by the caller, so `step` is deterministic and fully unit-tested.
- `src/core/render.phel`, `src/core/input.phel` — the effectful edges (terminal drawing via [`phel-cli-gui`](https://github.com/Chemaclass/phel-cli-gui), keyboard reading).
- `src/game.phel` — the loop: read input → `step` → render → sleep → repeat.

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

[](#development)

```
composer test           # run the phel test suite
composer format         # format src + tests
composer build          # compile to out/
composer phar           # build build/out/phel-flappybird.phar
composer ci             # format-check + test + build
```

Releasing
---------

[](#releasing)

```
./tools/release.sh 0.1.0          # validate, build+smoke-test PHAR, tag, GH release
./tools/release.sh --dry-run      # preview without changing anything
```

License
-------

[](#license)

MIT

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance90

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

46d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3d166420c6770c5941e10bd68b2d26501eabb432e280d8e6eba0a344bcc1e5ae?d=identicon)[Chemaclass](/maintainers/Chemaclass)

---

Top Contributors

[![Chemaclass](https://avatars.githubusercontent.com/u/5256287?v=4)](https://github.com/Chemaclass "Chemaclass (15 commits)")

---

Tags

ansiascii-gamecli-gameflappy-birdfunctional-programminggamelispphelphel-langphpterminal-gametuiclifunctionalgamelispphelflappybird

### Embed Badge

![Health badge](/badges/chemaclass-phel-flappybird/health.svg)

```
[![Health](https://phpackages.com/badges/chemaclass-phel-flappybird/health.svg)](https://phpackages.com/packages/chemaclass-phel-flappybird)
```

###  Alternatives

[symfony/console

Eases the creation of beautiful and testable command line interfaces

9.8k1.1B14.3k](/packages/symfony-console)[nunomaduro/collision

Cli error handling for console/command-line PHP applications.

4.7k357.7M11.6k](/packages/nunomaduro-collision)[nunomaduro/termwind

It's like Tailwind CSS, but for the console.

2.5k271.5M396](/packages/nunomaduro-termwind)[wp-cli/wp-cli

WP-CLI framework

5.1k19.2M415](/packages/wp-cli-wp-cli)[wp-cli/php-cli-tools

Console utilities for PHP

68227.8M378](/packages/wp-cli-php-cli-tools)[phel-lang/phel-lang

Phel is a functional programming language that compiles to PHP

5186.0k19](/packages/phel-lang-phel-lang)

PHPackages © 2026

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