Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gabrielcsapo/woof
🐶 command line applications made as easy as fetch
https://github.com/gabrielcsapo/woof
command-line javascript utility woof
Last synced: 23 days ago
JSON representation
🐶 command line applications made as easy as fetch
- Host: GitHub
- URL: https://github.com/gabrielcsapo/woof
- Owner: gabrielcsapo
- License: apache-2.0
- Created: 2017-12-12T22:39:49.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2022-03-13T22:03:39.000Z (almost 3 years ago)
- Last Synced: 2025-01-03T07:45:51.550Z (about 1 month ago)
- Topics: command-line, javascript, utility, woof
- Language: JavaScript
- Homepage: https://gabrielcsapo.github.io/woof
- Size: 30.3 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
woof
command line applications made as easy as fetch
[![Npm Version](https://img.shields.io/npm/v/woof.svg)](https://www.npmjs.com/package/woof)
[![Build Status](https://travis-ci.org/gabrielcsapo/woof.svg?branch=master)](https://travis-ci.org/gabrielcsapo/woof)
[![Coverage Status](https://lcov-server.gabrielcsapo.com/badge/github%2Ecom/gabrielcsapo/woof.svg)](https://lcov-server.gabrielcsapo.com/coverage/github%2Ecom/gabrielcsapo/woof)
[![Dependency Status](https://starbuck.gabrielcsapo.com/badge/github/gabrielcsapo/woof/status.svg)](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/woof)
[![devDependency Status](https://starbuck.gabrielcsapo.com/badge/github/gabrielcsapo/woof/dev-status.svg)](https://starbuck.gabrielcsapo.com/github/gabrielcsapo/woof#info=devDependencies)
[![npm](https://img.shields.io/npm/dt/woof.svg)]()
[![npm](https://img.shields.io/npm/dm/woof.svg)]()## Installation
```
npm install woof
```## Usage
```javascript
const cli = woof(`
Usage
$ fooCommands:
start, -s Starts foo!
compile, -c Compile foo!Options
--rainbow, -r Include a rainbow
--unicorn, -u [type] Include a unicorn [rainbow|sea]Examples
$ foo unicorns --rainbow
🌈 unicorns 🌈$ foo --unicorn rainbow
🌈 🦄 🌈$ foo --unicorn sea
🌊 🦄 🌊
`, {
commands: {
start: {
alias: 's'
},
compile: {
alias: 'c'
}
},
flags: {
rainbow: {
type: 'boolean',
alias: 'r'
},
unicorn: {
type: 'string',
alias: 'u',
default: 'rainbow',
validate: function (value) {
return ['rainbow', 'sea'].indexOf(value) === -1 ? `please providate a valid unicorn type (rainbow|sea), '${value}' is not a valid option` : true
}
}
}
});console.log(cli);
```