← Back to archive

Repo of the Day

vyrx-dev/tarang

Published: Dec 4, 2026

Open repository ↗

Animation library for terminal UIs

Summary

Tarang is a Go library for adding animations to terminal user interfaces. Its API separates an effect from the frame loop: an application creates a player, advances it by elapsed time, and renders the current view until the animation is complete.

What it is useful for

Use Tarang when a CLI or TUI needs more than static terminal output—for example, an animated greeting, status message, banner, or splash sequence. The documented recipes cover banners, status text, splash sequences, and custom effects, while the styling guide covers colors, easing, and Unicode.

The core model is straightforward. An engineer chooses an effect, supplies the text to animate, and controls when frames advance. tarang.FromEnv() applies terminal preferences, and the configuration guide covers sizing, replay, and pacing. This makes Tarang relevant both to standalone command-line programs and to larger terminal applications.

For applications built with Bubble Tea, the repository includes integration documentation for Bubble Tea v2 and guidance for other renderers. Engineers with strict latency or allocation requirements can consult the architecture and performance-budget documents before integrating the animation loop.

The main terminal requirement is important: the standalone quick start is designed for an ANSI-capable terminal. The troubleshooting guide addresses rendering and timing issues, including difficulties that can arise outside that environment.

How engineers can use it

Tarang requires Go 1.24 or later. Inside an existing Go module, install it with the documented command:

go get github.com/vyrx-dev/tarang

Save the README’s quick-start program as main.go. The essential loop creates a typewriter animation, prints its initial frame, advances it at a fixed interval, and redraws the view:

p := tarang.New("Hello, Tarang!", effects.Typewriter(), tarang.FromEnv())
fmt.Print(p.View())

for !p.Done() {
    time.Sleep(time.Second / 30)
    p.Advance(time.Second / 30)
    fmt.Printf("\r%s", p.View())
}

Run it from the project directory in an ANSI-capable terminal:

go run .

To inspect the available effects interactively, use the documented Bubble Tea showcase:

cd adapters/bubbletea && go run ./examples/showcase

For production use, the repository provides guides for getting started, configuration, styling and timing, host integration, custom effects, troubleshooting, and the API reference. These are the right starting points when replacing the fixed demo interval with application timing or embedding Tarang in an existing renderer.