Installation
This page provides a clear and accurate guide to installing Lip Gloss.
Get Lip Gloss Installed
Ready to add some glamour to your terminal output? This guide will walk you through installing Lip Gloss and getting started with a simple example. Let’s make your terminal shine!
Lip Gloss requires Go 1.22 or higher. Ensure your Go environment is set up before proceeding.
Requirements
Before installing Lip Gloss, confirm you have the following:
Go 1.22 or higher installed. Check your version with:
go versionIf needed, update Go via the official Go installation guide.
Setup and Usage
Follow these steps to install Lip Gloss and try it out:
Install Lip Gloss
Add Lip Gloss to your Go project with:
go get github.com/charmbracelet/lipgloss@latestThis fetches the latest version and updates your module’s dependencies.
Create a Styled Output
Import Lip Gloss and apply a style:
package main
import (
"fmt"
"github.com/charmbracelet/lipgloss"
)
func main() {
style := lipgloss.NewStyle().Foreground(lipgloss.Color("205")).Bold(true)
fmt.Println(style.Render("Hello, Lip Gloss!"))
}Run it with:
go run main.goYou’ll see a bold, styled “Hello, Lip Gloss!” message in your terminal.
Ensure your project has a Go module initialized (e.g., go mod init my-app) before running go get to track dependencies correctly.
Keeping Up to Date
To update Lip Gloss to the latest version:
Run the following command:
go get -u github.com/charmbracelet/lipgloss@latestThis ensures you have the latest features and fixes.
How is this guide?