bubble

package
v0.60.1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 10 Imported by: 0

README

# gum

https://github.com/charmbracelet/gum.git

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Choose

func Choose(prompt string, options []string, multiple bool) (string, error)

func Confirm

func Confirm(prompt string) (string, error)

func Edit

func Edit(prompt, placeholder, value string) (string, error)

func Help

func Help()

func PickFile

func PickFile(prompt string, path string) (string, error)

func Write

func Write(prompt, placeholder, value string) (string, error)

Types

type Gum

type Gum struct {
	// Choose provides an interface to choose one option from a given list of
	// options. The options can be provided as (new-line separated) stdin or a
	// list of arguments.
	// Let's pick from a list of gum flavors:
	//
	// $ gum choose "Strawberry" "Banana" "Cherry"
	//
	Choose choose.Options `cmd:"" help:"Choose an option from a list of choices"`

	// Confirm provides an interface to ask a user to confirm an action.
	// The user is provided with an interface to choose an affirmative or
	// negative answer, which is then reflected in the exit code for use in
	// scripting.
	//
	// If the user selects the affirmative answer, the program exits with 0.
	// If the user selects the negative answer, the program exits with 1.
	Confirm confirm.Options `cmd:"" help:"Ask a user to confirm an action"`

	// File provides an interface to pick a file from a folder (tree).
	// The user is provided a file manager-like interface to navigate, to
	// select a file.
	//
	// Let's pick a file from the current directory:
	//
	// $ gum file
	// $ gum file .
	//
	// Let's pick a file from the home directory:
	//
	// $ gum file $HOME
	File file.Options `cmd:"" help:"Pick a file from a folder"`

	// Write provides a shell script interface for the text area bubble.
	// https://github.com/charmbracelet/bubbles/tree/master/textarea
	//
	// It can be used to ask the user to write some long form of text
	// (multi-line) input. The text the user entered will be sent to stdout.
	//
	// $ gum write > output.text
	//
	Write write.Options `cmd:"" help:"Prompt for long-form text"`

	Edit edit.Options `cmd:"" help:"Prompt for long-form text"`
}

Gum is the command-line interface for Gum.

func BubbleGum

func BubbleGum(args []string) (*Gum, error)

Directories

Path Synopsis
Package choose provides an interface to choose one option from a given list of options.
Package choose provides an interface to choose one option from a given list of options.
Package confirm provides an interface to ask a user to confirm an action.
Package confirm provides an interface to ask a user to confirm an action.
Package file provides an interface to pick a file from a folder (tree).
Package file provides an interface to pick a file from a folder (tree).
util
tty
Package tty provides tty-aware printing.
Package tty provides tty-aware printing.
Package write provides a shell script interface for the text area bubble.
Package write provides a shell script interface for the text area bubble.

Jump to

Keyboard shortcuts

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