fluffyui

module
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT

README

FluffyUI

The most comprehensive TUI framework for Go.

88 widgets. CSS-like styling. Built-in accessibility. AI-ready.

Go Reference CI Release Go Report Card

FluffyUI Demo

Agent Skill

Agents working with FluffyUI should use the using-fluffyui skill.

How does FluffyUI compare?

Feature FluffyUI Bubble Tea Textual Ratatui
Language Go Go Python Rust
Widgets 88 ~15 ~40 ~15
CSS-like Styling Yes (FSS) No Yes No
Layout Engine Flexbox + Grid Manual CSS Grid Manual
Accessibility ARIA + TTS No No No
AI Agent (MCP) 145+ tools No No No
GPU Rendering 4 backends No No No
Reactive State Signal[T] Elm (TEA) Reactive Manual
Web Backend WebSocket No textual-web No
Hot Reload Yes No Yes No

Quick Start

package main

import "m31labs.dev/fluffyui/fluffy"

func main() {
    app, _ := fluffy.NewApp(
        fluffy.WithRoot(fluffy.VStack(
            fluffy.Label("Hello, FluffyUI!"),
            fluffy.PrimaryButton("Click me", func() {
                // Your logic here
            }),
        )),
    )
    app.Run()
}

Installation

go get m31labs.dev/fluffyui@latest

Requirements: Go 1.24 or later.

FluffyUI is released under the MIT License.

Scaffold a new project:

go install m31labs.dev/fluffyui/cmd/fluffy@latest
fluffy create my-app --template full
cd my-app && go run .

Widget Catalog

88 widgets organized into six categories:

Category Count Highlights
Input 18 Button, Input, TextArea, Select, Slider, DatePicker, TimePicker, ColorPicker, TagInput, Rating
Data 14 Table, DataGrid, List, Tree, DirectoryTree, Log, RichText, MarkdownViewer, Heatmap, Image
Layout 12 Grid, Flex, Stack, Splitter, ScrollView, Panel, AspectRatio, Drawer, FocusTrap, Sidebar
Navigation 12 Tabs, Menu, Breadcrumb, Stepper, CommandPalette, Accordion, Pagination, Link, SkipNav
Feedback 16 Dialog, Alert, ToastStack, Spinner, Progress, Sparkline, BarChart, LineChart, Badge, Skeleton
Utility 16 Inspector, DebugOverlay, PerformanceDashboard, VideoPlayer, Canvas, GPUCanvas, Tooltip, Popover

Full catalog: docs/widgets/overview.md

Styling with FSS

FluffyUI's stylesheet language (FSS) brings CSS-like styling to the terminal with hot reload:

Button {
    background: #3b82f6;
    color: white;
    padding: 0 2;
    border: rounded;
}

Button:hover {
    background: #2563eb;
}

Button.danger {
    background: #ef4444;
}
app, _ := fluffy.NewApp(
    fluffy.WithStylesheet("styles.fss"),
)

Supports selectors, pseudo-classes, transitions, min/max sizing, flexbox properties, and live reload during development with fluffy dev.

Reactive State

Type-safe signals with automatic UI updates:

count := state.NewSignal(0)

// Derived values recompute automatically
doubled := state.NewComputed(func() int {
    return count.Get() * 2
})

// Widgets observe signals and re-render on change
count.Set(42) // UI updates automatically

Accessibility

ARIA roles, screen reader announcements, and TTS built into every widget:

// Every widget implements accessibility.Accessible
widget.AccessibleRole()   // "button", "textbox", "grid", ...
widget.AccessibleName()   // Human-readable label
widget.AccessibleState()  // Focused, selected, expanded, ...
  • 40+ ARIA roles (WAI-ARIA 1.2/1.3)
  • 14 extended ARIA properties
  • TTS backends: espeak, SSIP (Linux), say (macOS), SAPI (Windows)
  • Focus management with visible indicators
  • Screen reader announcements across 67+ widget interaction points

AI Agent Integration (MCP)

FluffyUI exposes 145+ MCP tools so AI agents can read, navigate, and control your TUI:

import "m31labs.dev/fluffyui/agent"

srv, _ := agent.NewServer(agent.ServerOptions{
    Addr: "unix:/tmp/fluffyui.sock",
    App:  app,
})
go srv.Serve(ctx)

Three transports (stdio, SSE, Unix socket), 52 read tools, 56+ write tools, batch execution, and a built-in agent cookbook. See the AI Agent Tutorial.

Graphics and Animation

Canvas Graphics

  • Canvas API -- sub-cell drawing with Braille, Sextant, Quadrant, and ASCII blitters
  • GPU rendering -- Metal, OpenGL, WebGL, and Software backends
  • Animation -- tweens (10 easing functions), physics springs, particle systems
  • Transforms -- translate, rotate, scale with save/restore

More Features

  • Dev Loop -- hot-reload with fluffy dev -- go run .
  • Web Backend -- serve your TUI over WebSocket with auth and TLS
  • Keybindings -- registry-based commands with modes and stacking
  • Recording -- capture sessions as asciicast, export to video
  • Testing -- simulation backend for deterministic, headless tests
  • Clipboard -- OSC-52, platform tools, memory fallback (auto-detected)
  • i18n -- localization bundles and runtime wiring
  • Plugins -- lightweight registry for third-party widgets

Examples

go run ./examples/candy-wars       # Showcase trading game
go run ./examples/todo-app         # Full CRUD app
go run ./examples/dashboard        # Data visualization
go run ./examples/fireworks-demo   # 3D particle effects
go run ./examples/widget-gallery   # Complete widget sampler

Candy Wars Demo

38 example apps in examples/ covering every feature area. See docs/EXAMPLES.md for the full list.

Documentation

Guide Description
Getting Started Installation and first app
Architecture Core concepts and render pipeline
Widget Catalog All 88 widgets with usage
Styling (FSS) Stylesheets, themes, transitions
Accessibility Roles, announcements, TTS
Agent Integration MCP tools and transports
Testing Simulation backend and helpers
Performance Profiling and optimization
Bubble Tea Migration Moving from Bubble Tea
API Reference Package-level documentation

Contributing

Contributions are welcome! See CONTRIBUTING.md and CODE_OF_CONDUCT.md.

License

See the repository for license information.

Directories

Path Synopsis
Package accessibility provides accessibility primitives for widgets.
Package accessibility provides accessibility primitives for widgets.
atspi
Package atspi provides Linux accessibility support via AT-SPI D-Bus.
Package atspi provides Linux accessibility support via AT-SPI D-Bus.
nsaccessibility
Package nsaccessibility provides macOS accessibility support via NSAccessibility.
Package nsaccessibility provides macOS accessibility support via NSAccessibility.
tts
Package tts provides platform TTS backends implementing accessibility.Speaker.
Package tts provides platform TTS backends implementing accessibility.Speaker.
uiautomation
Package uiautomation provides Windows accessibility support via UI Automation.
Package uiautomation provides Windows accessibility support via UI Automation.
Package agent provides AI-friendly interaction with FluffyUI applications.
Package agent provides AI-friendly interaction with FluffyUI applications.
mcp
Package audio provides opinionated music and sound effect hooks for apps.
Package audio provides opinionated music and sound effect hooks for apps.
execdriver
Package execdriver provides a command-based audio driver.
Package execdriver provides a command-based audio driver.
Package backend defines the terminal backend interface for the TUI.
Package backend defines the terminal backend interface for the TUI.
sim
Package sim provides a simulation backend for testing.
Package sim provides a simulation backend for testing.
tcell
Package tcell provides a Backend implementation using tcell.
Package tcell provides a Backend implementation using tcell.
web
Package web provides a backend that renders FluffyUI applications to a web browser via WebSocket.
Package web provides a backend that renders FluffyUI applications to a web browser via WebSocket.
Package clipboard provides clipboard abstractions.
Package clipboard provides clipboard abstractions.
cmd
fluffy command
fluffy-speak command
Command fluffy-speak is a screen reader bridge for FluffyUI applications.
Command fluffy-speak is a screen reader bridge for FluffyUI applications.
Package compositor bridge provides integration with Bubbletea's rendering model.
Package compositor bridge provides integration with Bubbletea's rendering model.
docs
site command
Package dragdrop provides drag-and-drop interfaces.
Package dragdrop provides drag-and-drop interfaces.
examples
a11y-showcase command
A11y Showcase: a mini-dashboard demonstrating that FluffyUI gives you full accessibility -- ARIA roles, focus announcements, and TTS -- for free.
A11y Showcase: a mini-dashboard demonstrating that FluffyUI gives you full accessibility -- ARIA roles, focus announcements, and TTS -- for free.
agent-enhanced command
Example: Real-Time Agent Server
Example: Real-Time Agent Server
ai-agent-demo command
animation-demo command
aria-demo command
candy-wars command
Candy Wars - A FluffyUI Showcase Game
Candy Wars - A FluffyUI Showcase Game
command-palette command
counter command
custom-loop command
dashboard command
file-browser command
fireworks-demo command
Fireworks Demo - 3D particle effects with perspective projection
Fireworks Demo - 3D particle effects with perspective projection
fur-demo command
Package main demonstrates the fur console output package.
Package main demonstrates the fur console output package.
generate-demos command
Demo Generator - Creates asciicast recordings of FluffyUI widgets
Demo Generator - Creates asciicast recordings of FluffyUI widgets
gpu-canvas-demo command
graphics-demo command
inline command
minimal-counter command
Minimal counter in ~25 lines using only the fluffy convenience API.
Minimal counter in ~25 lines using only the fluffy convenience API.
minimal-dialog command
Minimal modal dialog opened by a button, dismissed with Enter or Escape.
Minimal modal dialog opened by a button, dismissed with Enter or Escape.
minimal-form command
Minimal form with name/email inputs and a submit button showing confirmation.
Minimal form with name/email inputs and a submit button showing confirmation.
minimal-table command
Minimal data table displaying a few rows of employee data.
Minimal data table displaying a few rows of employee data.
minimal-tabs command
Minimal tab navigation with three content panels.
Minimal tab navigation with three content panels.
minimal-temperature command
Minimal temperature converter in ~35 lines using only the fluffy convenience API.
Minimal temperature converter in ~35 lines using only the fluffy convenience API.
minimal-todo command
Minimal todo list in ~45 lines using only the fluffy convenience API.
Minimal todo list in ~45 lines using only the fluffy convenience API.
perf-dashboard command
quickstart command
recording command
settings-form command
showcase command
todo-app command
video-player command
water-demo command
Water Demo - GPU-accelerated waterfall with particles and mist
Water Demo - GPU-accelerated waterfall with particles and mist
widget-gallery command
Widget Gallery — interactive showcase of FluffyUI's widget library.
Widget Gallery — interactive showcase of FluffyUI's widget library.
widgets/data command
widgets/gallery command
widgets/input command
widgets/layout command
Package fluffy provides the high-level API for building terminal UIs.
Package fluffy provides the high-level API for building terminal UIs.
Package forms provides form state management and validation.
Package forms provides form state management and validation.
Package fur provides rich console output helpers for FluffyUI.
Package fur provides rich console output helpers for FluffyUI.
gpu
Package i18n bidi.go provides bidirectional text utilities for RTL language support.
Package i18n bidi.go provides bidirectional text utilities for RTL language support.
Package keybind provides key binding and command routing helpers.
Package keybind provides key binding and command routing helpers.
Package markdown provides markdown parsing and rendering for terminal UIs.
Package markdown provides markdown parsing and rendering for terminal UIs.
Package prompts provides standalone interactive prompts for terminal applications.
Package prompts provides standalone interactive prompts for terminal applications.
runtime/html.go
runtime/html.go
scripts
agent-driver command
agent-runner command
record-demos command
Record demo screencasts for all FluffyUI examples
Record demo screencasts for all FluffyUI examples
Package scroll provides viewport and scrollbar primitives.
Package scroll provides viewport and scrollbar primitives.
Package ssh provides an SSH server for serving FluffyUI applications remotely.
Package ssh provides an SSH server for serving FluffyUI applications remotely.
Package state provides minimal reactive primitives for terminal UIs.
Package state provides minimal reactive primitives for terminal UIs.
Package terminal provides terminal event types used throughout the UI.
Package terminal provides terminal event types used throughout the UI.
Package testing provides test utilities for FluffyUI applications.
Package testing provides test utilities for FluffyUI applications.
a11ytest
Package a11ytest provides ergonomic accessibility assertion functions for widget testing.
Package a11ytest provides ergonomic accessibility assertion functions for widget testing.
widgettest
Package widgettest provides test harness utilities for FluffyUI widgets.
Package widgettest provides test harness utilities for FluffyUI widgets.
Package theme provides a unified visual design system for terminal UIs.
Package theme provides a unified visual design system for terminal UIs.
third_party
mcp-go module
tools
gen_widgets_api command
Package video provides basic video decoding helpers backed by ffmpeg.
Package video provides basic video decoding helpers backed by ffmpeg.
Package widgets provides reusable widgets for terminal UIs.
Package widgets provides reusable widgets for terminal UIs.

Jump to

Keyboard shortcuts

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