Comments (4)
The use case is myapp do-it
with an arg, e.g. name
. When name
is not provided as an argument on the command line, then we'd like yargs-interactive to prompt for it. Currently you can only do interactive stuff without commands.
from yargs-interactive.
I am looking for command support too...
from yargs-interactive.
Hey @JoshMcCullough and @yfwz100 . Can you provide the use cases you are looking for with more detail? If you want to use command
, why not use yargs
directly?
The purpose of the library is to provide support for interactivity commands, using a yargs fashion, but also add the ability to pass values to these commands when the interactivity is not needed (i.e. in CI environments).
from yargs-interactive.
I came here looking for the same and thought it was somehow supported since the examples use .usage('$0 <command> [args]')
which would hint at "command" support. If that's not the case and not planned maybe these description should be updated to say just .usage('$0 [args]')
? Still agree with previous posters that the use case would be to have a main script with several commands where each command would support an interactive mode.
from yargs-interactive.
Related Issues (9)
- How to use the list type from inquirer? HOT 2
- Support for Typescript typings HOT 3
- Supplying argument does not remove prompt in `if-empty` mode HOT 3
- Checkbox list doesn't work on Linux HOT 1
- yargs fails when `choices` is set to a function HOT 3
- Following your example adding --interactive doesn't allow interactive mode HOT 3
- Describe (message) accepts a function, but Yargs throws an error anyway and works without any issues. HOT 2
- Prompt only for missing args? HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yargs-interactive.