/cli-of-life

Play Conway's Game of Life in your terminal.

Primary LanguageGoApache License 2.0Apache-2.0

CLI Of Life

GitHub release (latest by date) Build Go Report Card

Play Conway's Game of Life in your terminal!

cli-of-life demo

Installation

Docker

Click to expand

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

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

Homebrew (macOS, Linux)

Click to expand

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

brew install gabe565/tap/cli-of-life

APT (Ubuntu, Debian)

Click to expand
  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

RPM (CentOS, RHEL)

Click to expand
  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

AUR (Arch Linux)

Click to expand

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

Manual Installation

Click to expand

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

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

Key Description
mouse Place cells
space Play/pause
m Toggle between modes: smart, place, erase
wasd Move the game board
-/+ Zoom
</> Change playback speed
esc Toggle menu
t Tick
ctrl+c Quit

References