All Projects → alimozdemir → PromptCLI

alimozdemir / PromptCLI

Licence: MIT license
Interactive command line interface library

Programming Languages

C#
18002 projects

Projects that are alternatives of or similar to PromptCLI

requestty
An easy-to-use collection of interactive cli prompts inspired by Inquirer.js.
Stars: ✭ 158 (+426.67%)
Mutual labels:  prompt, inquirer
enquirer
Stylish, intuitive and user-friendly prompts, for Node.js. Used by eslint, webpack, yarn, pm2, pnpm, RedwoodJS, FactorJS, salesforce, Cypress, Google Lighthouse, Generate, tencent cloudbase, lint-staged, gluegun, hygen, hardhat, AWS Amplify, GitHub Actions Toolkit, @airbnb/nimbus, and many others! Please follow Enquirer's author: https://github.…
Stars: ✭ 6,523 (+21643.33%)
Mutual labels:  prompt, inquirer
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 (+143.33%)
Mutual labels:  prompt, inquirer
yargs-interactive
Interactive support for yargs
Stars: ✭ 40 (+33.33%)
Mutual labels:  prompt, inquirer
inquirer-fuzzy-path
Fuzzy file/directory search and select prompt for Inquirer.js
Stars: ✭ 69 (+130%)
Mutual labels:  prompt, inquirer
xontrib-prompt-bar
The bar prompt for xonsh shell with customizable sections and Starship support.
Stars: ✭ 27 (-10%)
Mutual labels:  prompt
zsh-aws-vault
oh-my-zsh plugin for aws-vault
Stars: ✭ 63 (+110%)
Mutual labels:  prompt
octofetch
Github user information on terminal :D
Stars: ✭ 65 (+116.67%)
Mutual labels:  prompt
fishline
A powerline prompt framework for the fish-shell built in fish-shell.
Stars: ✭ 66 (+120%)
Mutual labels:  prompt
Qprompt
Python library for quick CLI user prompts, input, and menus.
Stars: ✭ 46 (+53.33%)
Mutual labels:  prompt
promptconfig
🖥 Craft a custom terminal prompt with JSON.
Stars: ✭ 32 (+6.67%)
Mutual labels:  prompt
react-native-input-prompt
A cross-platform user input prompt component for React Native with Native UI.
Stars: ✭ 45 (+50%)
Mutual labels:  prompt
kafka-shell
⚡A supercharged, interactive Kafka shell built on top of the existing Kafka CLI tools.
Stars: ✭ 107 (+256.67%)
Mutual labels:  prompt
shellfirm
Intercept any risky patterns (default or defined by you) and prompt you a small challenge for double verification
Stars: ✭ 159 (+430%)
Mutual labels:  prompt
browse-manager
Chrome扩展,网址/域名拉黑,访问次数统计、提示,自动收藏。等
Stars: ✭ 81 (+170%)
Mutual labels:  prompt
powerless
Minimalistic/responsive ZSH prompt inspired by powerline.
Stars: ✭ 63 (+110%)
Mutual labels:  prompt
sirocco
🦜 A collection of interactive command line prompts for Lua
Stars: ✭ 85 (+183.33%)
Mutual labels:  prompt
jquery.dialog.js
A lightweight replacement for the browser's default dialog boxes.
Stars: ✭ 17 (-43.33%)
Mutual labels:  prompt
zcolors
🌈 Z Colors uses your $LS_COLORS to generate a coherent theme for Git and your Zsh prompt, command line and completions.
Stars: ✭ 38 (+26.67%)
Mutual labels:  prompt
prompt-base
This repository has been archived, use Enquirer instead.
Stars: ✭ 21 (-30%)
Mutual labels:  prompt

PromptCLI

Nuget Azure DevOps builds Coverage

PromptCLI is inspired from inquirer.js and enquirer.js. It is a interactive command line interface library.

Basics

Usage

public class TestClass
{
    [Input("Project Name ?")]
    public string ProjectName { get; set; }

    [Select(typeof(string), "License Type ?", "MIT", "GNU", "Apache")]
    public string License { get; set; }

    [Checkbox(typeof(int), "Level ?", 1, 2, 3, 4)]
    public IEnumerable<int> Level { get; set; }

    [Input("Briefly explain ?")]
    public string Description { get; set; }
}

static void Main(string[] args)
{
    var prompt = new Prompt();

    var obj = prompt.Run<TestClass>(obj);
}

Without POCO class (Callback Action)

You can handle a callback action after each step

var project = new Project();

var prompt = new Prompt();
prompt.Add(new InputComponent("Project Name", "Project1"))
        .Callback(i => project.ProjectName = i)
    .Add(new SelectComponent<string>("License Type", new List<string>() { "MIT", "Apache", "GNU" } ))
        .Callback(i => project.License = i)
    .Add(new CheckboxComponent<string>("Features", new List<string>() { "Linter", "Router", "Other" }))
        .Callback(i => project.Features = i)
    .Add(new InputComponent("Description"))
        .Callback(i => project.Description = i);
prompt.Begin();

Config

public class PromptConfig
{
    public ConsoleColor QuestionColor { get; } = ConsoleColor.Gray;
    public ConsoleColor AnswerColor { get; } = ConsoleColor.Cyan;
    public ConsoleColor CursorColor { get; } = ConsoleColor.Red;
    public string Cursor { get; } = "> ";
}

Contributions

All contributions are welcome if well described.

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].