- Home
- Skills
- Vanman2024
- Cli Builder
- Inquirer Patterns
inquirer-patterns_skill
- Python
0
GitHub Stars
2
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill vanman2024/cli-builder --skill inquirer-patterns- README.md8.1 KB
- SKILL.md11.9 KB
Overview
This skill provides a library of interactive prompt patterns for building professional CLI tools in Node.js and Python. It includes templates for text, list, checkbox, password, autocomplete, and conditional questions, plus examples and validation patterns. Use it to speed up development of wizards, scaffolding tools, and interactive questionnaires.
How this skill works
The skill supplies ready-to-use templates and example flows for both inquirer (Node.js) and questionary (Python). Choose the prompt type, copy the template for your language, install the listed dependencies, then customize questions, validation, defaults, and conditional logic. Built-in scripts help install deps, validate templates, and generate boilerplate code.
When to use it
- Creating interactive CLIs that collect user input
- Building project scaffolding or initialization wizards
- Implementing step-by-step installers and multi-step flows
- Adding secure credential prompts or password confirmation
- Providing large-choice selection with autocomplete or fuzzy search
Best practices
- Always validate inputs with clear error messages
- Provide sensible defaults to reduce user friction
- Use conditional questions to skip irrelevant prompts
- Group related prompts to preserve context
- Handle interrupts (Ctrl+C) and environment rendering errors gracefully
- Test all flows interactively before release
Example use cases
- Project initialization wizard that collects name, framework, and features
- Installer that asks which components to install and configures each selected item
- Secure credential capture with password + confirmation and strength validation
- Admin CLI that uses autocomplete for large option lists (databases, services)
- Conditional configuration: ask DB host only when a non-SQLite DB is chosen
FAQ
Node.js templates use inquirer (plus inquirer-autocomplete-prompt for autocomplete). Python templates use questionary and prompt_toolkit.
How do I add conditional questions?
In Node.js use the question's when property (a function that checks previous answers). In Python, run conditional questionary prompts inside if blocks after reading earlier answers.