Git Product home page Git Product logo

promptkit's Introduction

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:

promptkit's People

Contributors

erikgeiser avatar fiws avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.