Thanks to visit codestin.com
Credit goes to github.com

Skip to content

marslo/mtui

Repository files navigation

mtui

✨ A modern, customizable terminal UI toolkit for input and confirmation prompts, built with Bubbletea

Terminal UI prompts with customizable placeholder styling, powered by @Bubbletea

mtui provides beautiful CLI prompts with keyboard interaction, placeholder support, and stylable input fields — perfect for Git hooks, scripts, or standalone tools.


✨ Features

  • 📥 Single-line Input with placeholder and Tab-to-autofill
  • Yes/No Confirmation with arrow or Tab navigation
  • 🎨 Style Customization for placeholder and input text
  • ⚙️ Keyboard shortcuts (Enter, Esc, Tab, Ctrl+J)
  • 🍵 Built with Bubbletea, Bubbles, and Lipgloss

📦 Installation

git clone https://github.com/marslo/mtui.git
cd mtui
./build.sh

🚀 Usage

Input Prompt

./mtui input --placeholder="branch-name"

With Style Customization:

./mtui input \
  --placeholder="feat: breaking change" \
  --placeholder-style="italic,faint,foreground=245" \
  --input-style="bold"
  • Press Tab to use placeholder as value
  • Press Enter or Ctrl+J to confirm
  • Press Esc to cancel

Confirmation Prompt

./mtui confirm --message="Do you want to deploy?"
  • Navigate with Up/Down or Tab
  • Confirm with Enter
  • Cancel with Esc

🎛 Available Flags

input Command

FLAG DESCRIPTION
--placeholder Text shown as placeholder when input is empty
--placeholder-style Comma-separated style keywords (see below)
--input-style Comma-separated style for input text

Supported style values: bold, italic, faint, underline, strikethrough, foreground=<color>

confirm Command

FLAG DESCRIPTION
--message Prompt message for confirmation

🧩 License

MIT


🙌 Acknowledgements

About

Terminal UI prompts with customizable placeholder styling, powered by Bubbletea

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •