gotermfx

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2026 License: MIT Imports: 13 Imported by: 0

README

GoTermFX

GoTermFX

Terminal animations for people who spend too much time in the terminal.

Go Version Go Reference Test codecov


GoTermFX is a zero-dependency terminal animation CLI written in Go. Rain, matrix, fireworks, hyperspace, snow — all running directly in your terminal, all cancellable with a single keypress. You can also drop in your own animations with about 10 lines of Go.

Install

go install github.com/mohamedation/gotermfx@latest
Build from source
git clone https://github.com/mohamedation/gotermfx.git
cd gotermfx
make build        # compiles to ./bin/gotermfx
make install      # installs to /usr/local/bin
make uninstall    # removes it
make clean        # removes ./bin

You can also run without installing:

make run                  # runs a random animation
make run ARGS=matrix      # run a specific one
Tests
make test    # run unit tests
make cover   # run tests with coverage summary

Usage

gotermfx                  # random animation
gotermfx matrix           # run a specific one
gotermfx -i               # interactive picker
gotermfx -1               # run once then exit
gotermfx -1 -d 5s         # with a max duration for animations with a sequence
gotermfx -h               # help

Press any key to stop.

Animations

Matrix

Classic. had to include it and cant forget about CMatrix which is one of the OG out there

Matrix animation
WarGHOST

WarGames is one of my fav movie. I had to include this.

WarGHOST animation ps. only a demo
WikiDecrypt

Sneakers is also one of the best OG pentesters story. WikiDecrypt Fetches a random Wikipedia article and reveals it character by character, like in the movie and also like no-more-secrets by bartobri

WikiDecrypt animation
Hyperspace
Hyperspace animation
Rain
Rain animation
Fireworks
Fireworks animation
Snow
Snow animation
Starfield
Starfield animation

Add Your Own

The whole thing is built around a single interface:

type Animation interface {
    Run(ctx context.Context)
}

Create a file in animations/, implement Run, register it in init, and it shows up automatically:

package animations

import (
    "context"
    "gotermfx/termfx"
)

type myAnimation struct{}

func (a *myAnimation) Run(ctx context.Context) {
    for {
        select {
        case <-ctx.Done():
            return
        default:
            // draw something
        }
    }
}

func init() {
    termfx.Register("MyAnimation", &myAnimation{})
}

PRs welcome.

License

MIT — do whatever you want with it.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package animations contains the built-in terminal animations registered with the termfx registry on import.
Package animations contains the built-in terminal animations registered with the termfx registry on import.
Package termfx provides the animation registry and terminal helpers used by gotermfx.
Package termfx provides the animation registry and terminal helpers used by gotermfx.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL