🎉 Happy News! The new website is out :-) Google

bpkg-prompt

bpkg-prompt

Beautiful interactive prompts for bash scripts. Build installer wizards, CLI tools and interactive menus with ease.

Installation

bpkg install nicowillis/bpkg-prompt

Usage

source bpkg_modules/bpkg-prompt/prompt.sh

# Yes/no confirmation
if prompt_confirm "Delete all files?"; then
  rm -rf ./dist
fi

# Text input with default
name=$(prompt_input "Enter your name" "World")
echo "Hello, $name!"

# Password (hidden input)
pass=$(prompt_password "Enter password")

# Select from list
choice=$(prompt_select "Choose environment" dev staging production)
echo "Deploying to: $choice"

Functions

  • prompt_confirm — yes/no question, returns 0/1
  • prompt_input — text input with optional default
  • prompt_password — masked password input
  • prompt_select — arrow-key selection menu