Add cleanliness and freshness to your shell scripts.
XYLITOL plays a role similar to gum, but since it's written in Amber,
it doesn't depend on external binaries and remains fully portable.
Just download and execute xylitol.sh script. (Bash 4.0+ is required.)
ANSI support is required for the terminal.
or use Amber to compile Bash script from amber code.
bash <(curl -s "https://raw.githubusercontent.com/amber-lang/amber/master/setup/install.sh")
amber build src/main.ab xylitol.sh
choose: Choose an option from a list of choicesinput: Prompt the user for input.confirm: Prompt the user for confirmation (yes/no).
Choose an option from a list of choices
cat songs.txt | ./xylitol.sh choose
cat foods.txt | ./xylitol.sh choose --header "Grocery Shopping"Prompt for input with a simple command.
./xylitol.sh input > answer.txt
./xylitol.sh input --prompt="Enter password: " --password > password.txtPrompt the user for confirmation (yes/no).
./xylitol.sh confirm && rm file.txt || echo "File not removed"- macOS 15+ / iTerm2 3.6.2+ / GNU bash 5.3.3+
- macOS 15+ / iTerm2 3.6.2+ / Bash subshell in nushell 0.101.0+
- Arch Linux ARM / Wezterm 20240203+ / GNU bash 5.3.3+