Help us shape the future of Go! Take the 2026 Go Developer Survey

bubbletea-cinematic

module
v0.0.0-...-400baba Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2026 License: MIT

README

bubbletea-cinematic

Cinematic rendering primitives and animated widgets for Bubble Tea TUIs.

Particles, shader-style backgrounds, braille subpixel rendering, compositing, scene transitions, graph animations, and agent dashboards — all in pure Go.

Why?

Bubble Tea is excellent for terminal app architecture. bubbletea-cinematic adds the missing visual layer: motion, depth, particles, transitions, and high-density terminal rendering primitives.

Use it when your CLI should feel alive without becoming a heavy GUI.

Features

  • Particles & Physics — Gravity, drag, trails, attraction, object pooling.
  • Shader Backgrounds — Plasma, void, noise, pulse, gradient. Shader-style animated terminal backgrounds.
  • Braille Rendering — 2x4 subpixel resolution per character. Draw circles, lines, spirals at high fidelity.
  • Cell Buffer Compositor — Z-index layering, opacity blending, multi-layer compositing.
  • Scene Management — Scene lifecycle, transitions (fade, slide, dissolve, wipe, particle burst).
  • Timeline & Keyframes — Sequence events, animate properties with easing curves.
  • Easing Library — 30+ easing functions: quad, cubic, elastic, bounce, back, and utilities.
  • Tween Engine — Animate any float value. Sequences, groups, loops, reverse.
  • Graph Widget — Force-directed layout, node animations, packet flow visualization.
  • Pulse Widget — Concentric ring animations with configurable colors and intensity.
  • Background Widget — Drop-in animated shader backgrounds for any Bubble Tea app.
  • Agent Dashboard — AI agent visualization: state machine, memory ring, neural graph, metrics.

Install

go get github.com/OnlineChefGroep/bubbletea-cinematic@latest

Quick Start

package main

import (
    "log"

    tea "github.com/charmbracelet/bubbletea"
    "github.com/OnlineChefGroep/bubbletea-cinematic/widget"
)

func main() {
    p := tea.NewProgram(
        widget.NewPlasmaBackground(80, 24),
        tea.WithAltScreen(),
    )
    if _, err := p.Run(); err != nil {
        log.Fatal(err)
    }
}

Examples

Run any example with:

go run examples/<name>/main.go
Example Description
basic-particles Particle system demo
shader-showcase Animated terminal backgrounds
matrix-rain Matrix-style rain widget
graph-demo Animated graph and packet flow
agent-dashboard Dashboard-style agent visualization
full-showcase Combined visual demo
wish-server SSH server serving dashboards via Wish

Packages

Package Purpose
motion Particles, physics, vectors, easing, tweening
render Buffers, braille renderer, shaders, compositor
scene Scene lifecycle, transitions, ticker, timeline
widget Ready-to-use animated Bubble Tea widgets
agent Agent/dashboard visualization primitives

Architecture

                    +-----------+
                    |  widget/  |  Ready-to-use components
                    +-----+-----+
                          |
           +--------------+--------------+
           |              |              |
     +-----+-----+  +----+----+  +------+-----+
     |  motion/   |  | render/ |  |   scene/   |
     | particles  |  | buffer  |  | transitions|
     | physics    |  | braille |  | timeline   |
     | easing     |  | shader  |  | ticker     |
     | tween      |  | compos. |  | manager    |
     +-----+------+  +----+----+  +------+-----+
           |              |              |
           +--------------+--------------+
                          |
                    +-----+-----+
                    | internal/ |  Math, color utilities
                    +-----------+

Data flow:

  1. scene.Ticker produces frame ticks with delta time
  2. motion package updates physics, particles, tweens
  3. render package draws to buffers (cell or braille)
  4. render.Compositor layers buffers with z-order
  5. scene.Manager handles scene transitions
  6. Bubble Tea renders the final string to the terminal

Performance

This library is designed for smooth terminal animation and allocation-aware rendering. Run local validation with:

go test ./...
go test -bench=. -benchmem ./...

Documentation

Contributing

See CONTRIBUTING.md.

Security

See SECURITY.md.

License

MIT — see LICENSE.


Built for terminal artists who refuse to be boring.

Directories

Path Synopsis
Package agent provides visualization components for AI agent monitoring and state display.
Package agent provides visualization components for AI agent monitoring and state display.
cmd
example command
Package main provides a demo application showcasing bubbletea-cinematic features.
Package main provides a demo application showcasing bubbletea-cinematic features.
examples
agent-dashboard command
Package main demonstrates the agent dashboard with auto-cycling states.
Package main demonstrates the agent dashboard with auto-cycling states.
basic-particles command
Package main demonstrates a simple particle system with bubbletea-cinematic.
Package main demonstrates a simple particle system with bubbletea-cinematic.
full-showcase command
Package main combines ALL bubbletea-cinematic features into one epic demo.
Package main combines ALL bubbletea-cinematic features into one epic demo.
graph-demo command
Package main demonstrates animated graph visualization with force-directed layout.
Package main demonstrates animated graph visualization with force-directed layout.
matrix-rain command
Package main implements the classic Matrix digital rain effect.
Package main implements the classic Matrix digital rain effect.
shader-showcase command
Package main cycles through all shader types to showcase render quality.
Package main cycles through all shader types to showcase render quality.
wish-server command
Package main demonstrates serving the agent dashboard over SSH using Wish.
Package main demonstrates serving the agent dashboard over SSH using Wish.
Package motion provides physics, particles, easing, and tweening for terminal animations.
Package motion provides physics, particles, easing, and tweening for terminal animations.
Package render provides braille high-resolution rendering (2x4 subpixels per character).
Package render provides braille high-resolution rendering (2x4 subpixels per character).
Package scene provides scene management, transitions, and frame timing for Bubble Tea cinematic applications.
Package scene provides scene management, transitions, and frame timing for Bubble Tea cinematic applications.
Package widget provides ready-to-use Bubble Tea widgets with cinematic effects.
Package widget provides ready-to-use Bubble Tea widgets with cinematic effects.

Jump to

Keyboard shortcuts

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