Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fluents/cli-chain
easy, powerful, interactive, fluent cli.
https://github.com/fluents/cli-chain
chain cli config fluent interactive prompt step ui
Last synced: about 3 hours ago
JSON representation
easy, powerful, interactive, fluent cli.
- Host: GitHub
- URL: https://github.com/fluents/cli-chain
- Owner: fluents
- Created: 2017-05-03T08:48:09.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-05-04T23:52:05.000Z (over 7 years ago)
- Last Synced: 2024-10-28T15:25:56.663Z (19 days ago)
- Topics: chain, cli, config, fluent, interactive, prompt, step, ui
- Language: JavaScript
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-fluents - cli-chain - - *Maintainer*: `James`[![Github](https://rawgit.com/d3viant0ne/awesome-webpack/master/media/github-square.svg)](https://github.com/aretecode)[![Twitter](https://rawgit.com/d3viant0ne/awesome-webpack/master/media/twitter-square.svg)](https://twitter.com/aretecode) (My Fluent Packages)
README
# 🖥⛓ cli-chain
[![NPM version][cli-chain-npm-image]][cli-chain-npm-url]
[![MIT License][license-image]][license-url]
[![fliphub][gitter-badge]][gitter-url]
[![flipfam][flipfam-image]][flipfam-url][cli-chain-npm-image]: https://img.shields.io/npm/v/cli-chain.svg
[cli-chain-npm-url]: https://npmjs.org/package/cli-chain
[license-image]: http://img.shields.io/badge/license-MIT-blue.svg?style=flat
[license-url]: https://spdx.org/licenses/MIT
[gitter-badge]: https://img.shields.io/gitter/room/fliphub/pink.svg
[gitter-url]: https://gitter.im/fliphub/Lobby
[flipfam-image]: https://img.shields.io/badge/%F0%9F%8F%97%20%F0%9F%92%A0-flipfam-9659F7.svg
[flipfam-url]: https://www.npmjs.com/package/flipfam> easy, powerful, interactive, fluent cli.
## [📖 documentation](./docs)
## [📘 examples](./examples)
extending [vorpal](https://github.com/dthree/vorpal) it comes with all the goodies, nestable interactive command action stories with *~10x* less lines of code than any other lib.
![allthat](https://cloud.githubusercontent.com/assets/4022631/24635847/06b3d836-188b-11e7-9e5c-f3362c8b70ca.gif)
```js
const {CLI, log} = require('cli-chain')CLI.program()
.command('release')
.actionPrompt('confirm')
.type('confirm')
.message('Are you sure you want to release?')
.step('env')
.checkbox('production', true)
.checkbox('development', false)
.then((args) => {
if (args.continue) log.yellow('Good move.').echo()
else log.bold('Off we go!.').data(args).echo()
})
.command('skeleton')
.alias('seed')
.alias('scaffold')
.actionPrompt('is this cool or what?', 'confirm')
.parse()
.show()
```## storytelling
![cli](https://cloud.githubusercontent.com/assets/4022631/24635848/06c91a0c-188b-11e7-9d7b-9c6f1c433d46.gif)
```js
const CLI = require('cli-chain')const easyButton = CLI
.step('presets', 'checkbox', '[presets message]')
.checkbox('production', true)
.checkbox('development', false)
.step('approved')
.checkbox('magical', true)
.checkbox('unicorns', false)
.child('unicorn babies', 'input')
.input('so cute!')
.toSteps()
.step('confirm or deny?', 'confirm')
.child('fosho fosho?', 'confirm')
.toSteps()
.step('view', 'list')
.choice('React')
.choice('Inferno')
.choice('Vue')
.choice('Angular')
.choice('other')
.step('other', 'input').when(answers => answers.view == 'view.other')easyButton.run()
```## 👽 exports
```js
const {
vorpal,
inquirer,
log,Program,
Stepper,
Steps,
Question,
Choice,
Core,
} = require('cli-chain')
```