All Projects → theyakka → tardy

theyakka / tardy

Licence: other
Deal with CLI prompts in style

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to tardy

Cli Prompt
Allows you to prompt for user input on the command line, and optionally hide the characters they type
Stars: ✭ 228 (+470%)
Mutual labels:  prompt
credit-card-prompt
Credit card prompt with validation and address lookup
Stars: ✭ 13 (-67.5%)
Mutual labels:  prompt
requestty
An easy-to-use collection of interactive cli prompts inspired by Inquirer.js.
Stars: ✭ 158 (+295%)
Mutual labels:  prompt
Silver
A cross-shell customizable powerline-like prompt with icons
Stars: ✭ 238 (+495%)
Mutual labels:  prompt
terminer
Upgrade your terminal experience with a single command.
Stars: ✭ 28 (-30%)
Mutual labels:  prompt
bureau
💻 Informative and fast ZSH prompt with git status. Works well with HUGE repositories. Show username, hostname, path, git branch and status.
Stars: ✭ 27 (-32.5%)
Mutual labels:  prompt
Inquirer.js
A collection of common interactive command line user interfaces.
Stars: ✭ 15,378 (+38345%)
Mutual labels:  prompt
whaaaaat
Inquirer.js port to Python (https://www.npmjs.com/package/inquirer). people blame me for staling this project. I do not have time to work on this right now - whaaaaat do you want me to do? take it offline?
Stars: ✭ 73 (+82.5%)
Mutual labels:  prompt
impromptu.nvim
Create prompts fast and easy
Stars: ✭ 39 (-2.5%)
Mutual labels:  prompt
justified
Wrap, align and justify the words in a string.
Stars: ✭ 30 (-25%)
Mutual labels:  prompt
rainbow-bash-prompt
Make your bash prompt dynamically and randomly rainbow
Stars: ✭ 49 (+22.5%)
Mutual labels:  prompt
react-st-modal
Simple and flexible modal dialog component for React JS
Stars: ✭ 41 (+2.5%)
Mutual labels:  prompt
prompt-list
This repository has been archived, use Enquirer instead.
Stars: ✭ 13 (-67.5%)
Mutual labels:  prompt
Mercury
Mercury is a hacking tool used to collect information and use the information to further hurt the target
Stars: ✭ 236 (+490%)
Mutual labels:  prompt
guri
A simple and fast Oh-My-Zsh theme
Stars: ✭ 19 (-52.5%)
Mutual labels:  prompt
Spaceship Prompt
🚀⭐ A Zsh prompt for Astronauts
Stars: ✭ 15,748 (+39270%)
Mutual labels:  prompt
ax5ui-dialog
Javascript UI Component - Dialog - JavaScript Dialog / Bootstrap Dialog
Stars: ✭ 29 (-27.5%)
Mutual labels:  prompt
slick
async ZSH prompt
Stars: ✭ 21 (-47.5%)
Mutual labels:  prompt
inquire
A Rust library for building interactive prompts
Stars: ✭ 419 (+947.5%)
Mutual labels:  prompt
cli-autocomplete
A command line prompt with autocompletion.
Stars: ✭ 27 (-32.5%)
Mutual labels:  prompt

Tardy is an easy to use, but highly configurable, CLI / terminal prompt library for Go.

Go Version Build Status Coverage GoDoc

 

Features

What can tardy do? Lots!

  • Simple, straightforward prompt mechanism
  • Per-prompt return values or catch-all so you can check all prompts at the end
  • Built in Prompt types for common use-cases
    • Open-ended string values
    • Yes / No values
    • Pick from list of possible values
  • Retry values that don't meet criteria or are not supplied (if not optional)
  • Optionality and default prompt values
  • Case sensitive (or insensitive) matching
  • Extensible Prompt struct so you're not constrained when you need a custom input type with the following features:
    • Prompt validation function
    • Value conversion function (from string to whatever you want)

Installing

To install, run:

go get -u github.com/theyakka/tardy

You can then import tardy using:

import github.com/theyakka/tardy

Getting started

This is a super simple overview. If you want to really understand Tardy, we suggest you check out the Tardy Guide.

Anyhow, let's run through a super simple example.

p := tardy.NewPrompter()
p.Prompt(tardy.SimplePrompt("What is your name?", tardy.Required, ""))
fmt.Println("Your name is:", p.IndexedValues[0])

When run, you will see a prompt. After entering a value you should see something like the following:

What is your name?:  John Smith
Your name is: John Smith

FAQ

Why should I use this and not ____?

Why not?

We designed this library because nothing else fit our needs. If it fits yours, cool. If not, we won't hold it against you if you use something else.

Give it a try and if you like it, let us know! Either way, we love feedback.

Has it been tested in production? Can I use it in production?

The code here has been written based on Yakka's experiences with clients of all sizes. It has been production tested. That said, code is always evolving. We plan to keep on using it in production but we also plan to keep on improving it. If you find a bug, let us know!

Outro

Credits

Tardy is sponsored, owned and maintained by Yakka LLC. Follow us on Twitter @yakkallc. Feel free to reach out with suggestions, ideas or to say hey.

Security

If you believe you have identified a serious security vulnerability or issue with Tardy, please report it as soon as possible to [email protected]. Please refrain from posting it to the public issue tracker so that we have a chance to address it and notify everyone accordingly.

License

Tardy is released under a modified MIT license. See LICENSE for details.


Tardy is a Yakka original.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].