Home

Awesome

CLI Of Life

GitHub release (latest by date) Build Go Report Card

Play Conway's Game of Life in your terminal!

<p align="center"> <picture> <source media="(prefers-color-scheme: light)" srcset="https://github.com/user-attachments/assets/da285c94-da85-4adf-9a14-a0505236f50f"> <img width="720" alt="cli-of-life demo" src="https://github.com/user-attachments/assets/37d3a656-a362-4f75-baf8-c37af75f8376"> </picture> </p>

Installation

Docker

<details> <summary>Click to expand</summary>

A Docker image is available at ghcr.io/gabe565/cli-of-life

sudo docker run --rm -it ghcr.io/gabe565/cli-of-life
</details>

Homebrew (macOS, Linux)

<details> <summary>Click to expand</summary>

Install cli-of-life from gabe565/homebrew-tap:

brew install gabe565/tap/cli-of-life
</details>

APT (Ubuntu, Debian)

<details> <summary>Click to expand</summary>
  1. If you don't have it already, install the ca-certificates package

    sudo apt install ca-certificates
    
  2. Add gabe565 apt repository

    echo 'deb [trusted=yes] https://apt.gabe565.com /' | sudo tee /etc/apt/sources.list.d/gabe565.list
    
  3. Update apt repositories

    sudo apt update
    
  4. Install cli-of-life

    sudo apt install cli-of-life
    
</details>

RPM (CentOS, RHEL)

<details> <summary>Click to expand</summary>
  1. If you don't have it already, install the ca-certificates package

    sudo dnf install ca-certificates
    
  2. Add gabe565 rpm repository to /etc/yum.repos.d/gabe565.repo

    [gabe565]
    name=gabe565
    baseurl=https://rpm.gabe565.com
    enabled=1
    gpgcheck=0
    
  3. Install cli-of-life

    sudo dnf install cli-of-life
    
</details>

AUR (Arch Linux)

<details> <summary>Click to expand</summary>

Install cli-of-life-bin with your AUR helper of choice.

</details>

Manual Installation

<details> <summary>Click to expand</summary>

Download and run the latest release binary for your system and architecture.

</details>

Usage

Run cli-of-life in a terminal to play.

By default, the grid will be empty, but rle/plaintext files can be loaded with cli-of-life FILE.rle or cli-of-life https://...

For full command-line reference, see docs.

Examples

$ cli-of-life https://conwaylife.com/wiki/Gosper_glider_gun
$ cli-of-life https://conwaylife.com/wiki/Twin_bees_shuttle
$ cli-of-life https://conwaylife.com/wiki/Breeder_1
$ cli-of-life https://conwaylife.com/wiki/Replicator

See the LifeWiki for pattern files.

Keybinds

KeyDescription
mousePlace cells
spacePlay/pause
mToggle between modes: smart, place, erase
wasdMove the game board
-/+Zoom
</>Change playback speed
escToggle menu
tTick
ctrl+cQuit

References