bubbletea

Version, currently 2.0.83 versions

github.com/dsisnero/bubbletea.cr

Terminal library - port of golang bubbletea

0 stars
1 dependent
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  bubbletea:
    github: dsisnero/bubbletea.cr
    version: ~> 2.0.8

Then run:

shards install

shard.yml

Crystal
>= 1.19.1
License
MIT
Author
Dominic Sisneros
Target
  • bubbletea from src/bubbletea.cr

Dependencies

Runtime Dependencies

Development Dependencies

  • ameba~> 1.0github: crystal-ameba/amebadev
  • perf_tools*github: crystal-lang/perf-toolsdev

README


Bubble Tea is a refreshing drink with layers of flavor; this framework layers terminal UI components into elegant applications. Just as bubble tea combines tea, milk, and tapioca pearls into a harmonious drink, this framework combines models, updates, and views into cohesive terminal interfaces.


Quick Start

  1. Add to your shard.yml:

    dependencies:
      bubbletea:
        github: dsisnero/bubbletea
  2. Install:

    shards install
  3. Use in your code:

    require "bubbletea"
    
    # See bubbletea-examples/ for ported examples

Features

  • Elm Architecture: Model-Update-View pattern for terminal UIs
  • Exact Go parity: Direct port maintaining identical behavior
  • Command system: Side effects wrapped in Cmd objects
  • Event handling: Keyboard, mouse, and custom events
  • Terminal rendering: Efficient screen updates and cursor management

Development

make install   # Install dependencies
make test      # Run specs
make format    # Format Crystal code
make lint      # Run Crystal linter
rumdl fmt docs/ *.md  # Format markdown documentation

See Development Guide for full setup instructions.

Documentation

DocumentPurpose
ArchitectureSystem design and data flow
DevelopmentSetup and daily workflow
Coding GuidelinesCode style and conventions
TestingTest commands and patterns
PR WorkflowCommits, PRs, and review process
Porting ParityUpstream source tracking
Upgrade Guide v2Migration from v1 to v2

Contributing

  1. Create an issue: /forge-create-issue
  2. Implement: /forge-implement-issue <number>
  3. Self-review: /forge-reflect-pr
  4. Address feedback: /forge-address-pr-feedback
  5. Update changelog: /forge-update-changelog