2020-05-25 19:26:40 -04:00
# Bubble Tea
2020-01-15 16:58:41 -05:00
2020-07-29 17:15:41 -04:00
< p >
< a href = "https://pkg.go.dev/github.com/charmbracelet/bubbletea?tab=doc" > < img src = "https://godoc.org/github.com/golang/gddo?status.svg" alt = "GoDoc" > < / a >
< a href = "https://github.com/charmbracelet/bubbletea/actions" > < img src = "https://github.com/charmbracelet/glow/workflows/build/badge.svg" alt = "Build Status" > < / a >
< / p >
2020-07-29 16:15:19 -04:00
The fun, functional and stateful way to build terminal apps. A Go framework
based on [The Elm Architecture][elm].
2020-05-12 16:39:08 -04:00
2020-07-29 16:15:19 -04:00
Bubble Tea is well-suited for simple and complex terminal applications,
either inline, full-window, or a mix of both. It's been battle-tested in
several large projects and is production-ready.
2020-01-27 21:27:20 -05:00
2020-07-30 12:32:24 -04:00
It features a standard framerate-based renderer which is used by default as
well as support for high-performance scrollable regions when needed.
2020-07-29 16:15:19 -04:00
To get started, see the [tutorials][tutorials] and [examples][examples].
2020-01-15 16:58:41 -05:00
2020-07-29 16:15:19 -04:00
[tutorials]: https://github.com/charmbracelet/tea/tree/master/tutorials
[examples]: https://github.com/charmbracelet/tea/tree/master/examples
2020-01-15 16:58:41 -05:00
2020-07-29 16:15:19 -04:00
## Bubble Tea in the Wild
2020-01-15 16:58:41 -05:00
2020-07-29 16:15:19 -04:00
For some Bubble Tea programs in production, see:
2020-01-15 16:58:41 -05:00
2020-07-29 16:15:19 -04:00
* [Glow ](https://github.com/charmbracelet/glow ): a markdown reader, browser and online markdown stash
* [The Charm Tool ](https://github.com/charmbracelet/charm ): the Charm user account manager
2020-01-15 16:58:41 -05:00
2020-05-12 16:39:08 -04:00
2020-07-29 16:15:19 -04:00
## Libraries we use with Bubble Tea
2020-01-25 21:40:14 -05:00
2020-07-29 16:15:19 -04:00
* [Bubbles][bubbles] various Bubble Tea components we've built
* [Termenv][termenv]: Advanced ANSI styling for terminal applications
* [Reflow][reflow]: ANSI-aware methods for reflowing blocks of text
* [go-runewidth][runewidth]: Get the physical width of strings in terms of terminal cells. Many runes, such as East Asian charcters and emojis, are two cells wide, so measuring a layout with `len()` often won't cut it!
2020-01-15 16:58:41 -05:00
2020-07-29 16:15:19 -04:00
[termenv]: https://github.com/muesli/termenv
[reflow]: https://github.com/muesli/reflow
[bubbles]: https://github.com/charmbracelet/bubbles
[runewidth]: https://github.com/mattn/go-runewidth
2020-04-27 11:46:44 -04:00
2020-01-25 21:40:14 -05:00
2020-04-27 11:43:11 -04:00
## Acknowledgments
2020-01-15 16:58:41 -05:00
2020-07-29 16:15:19 -04:00
Inspired by [The Elm Architecture][elm] by Evan Czaplicki et al. and
[go-tea][gotea] by TJ Holowaychuk.
2020-01-15 16:58:41 -05:00
2020-01-15 23:40:50 -05:00
[elm]: https://guide.elm-lang.org/architecture/
2020-01-15 16:58:41 -05:00
[gotea]: https://github.com/tj/go-tea
2020-05-12 16:39:08 -04:00
2020-01-24 15:05:25 -05:00
## License
2020-07-29 16:43:59 -04:00
[MIT ](https://github.com/charmbracelet/bubbletea/raw/master/LICENSE )
2020-01-25 21:40:14 -05:00
***
2020-07-29 16:15:19 -04:00
A [Charm ](https://charm.sh ) project.
2020-01-25 21:40:14 -05:00
2020-07-29 16:15:19 -04:00
< img alt = "the Charm logo" src = "https://stuff.charm.sh/charm-badge.jpg" width = "400" >
2020-01-25 21:40:14 -05:00
Charm热爱开源!