Skip to content

Latest commit

 

History

History
84 lines (55 loc) · 4.35 KB

README.md

File metadata and controls

84 lines (55 loc) · 4.35 KB

promptkit

Interactive command line prompts with style!

Release Go Doc GitHub Action: Build
GitHub Action: Check Software License Go Report Card

Promptkit is a collection of common command line prompts for interactive programs. Each prompts comes with sensible defaults, re-mappable key bindings and many opportunities for heavy customization.


Disclaimers:

  • The API of library is not yet stable. Expect significant changes in minor versions before v1.0.0.
  • Windows is currently not explicitly supported because input events are dropped when running multiple prompts sequentially due to a bug in bubbletea. See charmbracelet/bubbletea#140 and charmbracelet/bubbletea#121 for more information.

Selection

Selection with filter and pagination support: Example Code


The selection prompt is highly customizable and also works well with custom types which for example enables filtering only on custom fields: Example Code


Text Input

A text input that supports editable default values: Example Code


Custom validation is also supported: Example Code


The text input can also be used in hidden mode for password prompts: Example Code


Confirmation Prompt

A confirmation prompt for binary questions: Example Code

Widget

The prompts in this library can also be used as bubbletea widgets: Example Code

Acknowledgements

This library is built on top of many great libraries, especially the following: