Installation Guide
Get Bubble Tea up and running to create stunning terminal apps with ease!
Get Bubble Tea Installed
Ready to build your first terminal user interface with Bubble Tea? This guide will walk you through setting up Bubble Tea in your Go project in just a few steps. Let’s make your terminal glamorous! ✨
Bubble Tea requires Go 1.22 or higher. Make sure your Go environment is ready before diving in!
Prerequisites
Before installing Bubble Tea, ensure you have the following:
A working installation of Go (version 1.22 or higher is recommended). Follow the official Go installation guide to set it up on your system.
Installation Steps
Follow these steps to add Bubble Tea to your project:
Create a Go Module
Create a new directory for your project and initialize a Go module:
mkdir my-tui-app
cd my-tui-app
go mod init my-tui-appThis sets up your project’s dependency management.
Install Bubble Tea
Use go get to add Bubble Tea to your project:
go get github.com/charmbracelet/bubbleteaThis downloads Bubble Tea and updates your go.mod file.
Import Bubble Tea
In your Go code, import the library:
import (
tea "github.com/charmbracelet/bubbletea"
)You’re now ready to build your TUI!
Ensure your Go module is initialized before running go get, or dependencies may not be tracked correctly.
What’s Next?
You’ve got Bubble Tea installed—time to start building! Check out these resources to dive deeper:
- Basic Tutorial: Build a simple counter app to learn the basics.
- Commands Tutorial: Explore handling I/O operations.
- Official Examples: See Bubble Tea in action with real-world apps.
- Go Docs: Reference the Bubble Tea API.
- Bubbles: Discover reusable UI components.
Welcome to the glamorous world of terminal apps! ✨
How is this guide?