PHPackages                             dbu/snake - 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. dbu/snake

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

dbu/snake
=========

Snake Game (demo for the Symfony console cursor control)

1.0.1(4y ago)165311MITPHPPHP ^7.4 || ^8.0

Since Feb 21Pushed 4y ago1 watchersCompare

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

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

```
                             /^\/^\
                           _|__|  O|
                  \/     /~     \_/ \
                   \____|__________/  \
                         \_______      \
                                 `\     \                    \
                                  |     |                     \
 ____              _             /     /                       \
/ ___| _ __   __ _| | _____     /     /                         \\
\___ \| '_ \ / _` | |/ / _ \   /     /                           \ \
 ___) | | | | (_| |   <  __/  /     /                             \  \
|____/|_| |_|\__,_|_|\_\___| /     /             _----_            \   \
                            /     /           _-~      ~-_         |   |
                           (      (        _-~    _--_    ~-_     _/   |
                            \      ~-____-~    _-~    ~-_    ~-_-~    /
                              ~-_           _-~          ~-_       _-~   - jurcy -
                                 ~--______-~                ~-___-~

```

A command line snake game implemented in PHP.

This demonstrates the `cursor` control provided by the Symfony Console. Let it not distract you from your work ;-)

The application is provided as a stand-alone .phar file with the help of `humbug/box`.

[![CI](https://github.com/dbu/php-snake/actions/workflows/ci.yaml/badge.svg)](https://github.com/dbu/php-snake/actions/workflows/ci.yaml)

Installation and Usage
======================

[](#installation-and-usage)

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

[](#installation)

```
wget https://github.com/dbu/php-snake/releases/latest/download/php-snake.phar
chmod u+x php-snake.phar

```

Run
---

[](#run)

```
./php-snake.phar

```

Development
===========

[](#development)

Clone the git repository, then run:

```
composer install
./bin/console

```

Create the .phar file
---------------------

[](#create-the-phar-file)

```
make dist

```

Code Quality
------------

[](#code-quality)

```
make cs
# to fix code style issues automatically
make fix-cs

```

FAQ
===

[](#faq)

My console is looking weird after running the command
-----------------------------------------------------

[](#my-console-is-looking-weird-after-running-the-command)

This can happen after aborting the program, e.g. with -c. Reset the console to sane defaults by typing:

```
stty sane

```

Be aware that input is probably hidden, so you won't see anything until you hit enter.

Why Snake?
----------

[](#why-snake)

Because it was the first thing I could think of. And its simple enough that it should be possible to follow what is going on.

What is this font?
------------------

[](#what-is-this-font)

Delta Corps Priest 1 from

Screenshots
===========

[](#screenshots)

[![start screen](snake.png)](snake.png)

[![lost game](snake2.png)](snake2.png)

[![gameplay](gameplay.gif)](gameplay.gif)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

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

Every ~0 days

Total

2

Last Release

1547d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/76576?v=4)[David Buchmann](/maintainers/dbu)[@dbu](https://github.com/dbu)

---

Top Contributors

[![dbu](https://avatars.githubusercontent.com/u/76576?v=4)](https://github.com/dbu "dbu (5 commits)")

### Embed Badge

![Health badge](/badges/dbu-snake/health.svg)

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

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[crazywhalecc/static-php-cli

Build single static PHP binary, with PHP project together, with popular extensions included.

1.8k13.9k](/packages/crazywhalecc-static-php-cli)[matthiasnoback/symfony-console-form

Use Symfony forms for Console command input

368264.8k8](/packages/matthiasnoback-symfony-console-form)[phpcr/phpcr-shell

Shell for PHPCR

721.3M8](/packages/phpcr-phpcr-shell)[madewithlove/license-checker

CLI tool to verify allowed licenses for composer dependencies

54449.8k21](/packages/madewithlove-license-checker)[shel/neos-terminal

Neos CMS Ui terminal for running Eel expressions and other commands

1441.3k](/packages/shel-neos-terminal)

PHPackages © 2026

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