All Projects → dthree → Vorpal

dthree / Vorpal

Licence: mit
Node's framework for interactive CLIs

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Vorpal

Pizza Cli
🍕 Order a pizza in a CLI app (just for fun!)
Stars: ✭ 58 (-98.94%)
Mutual labels:  cli, interactive
Sharprompt
Interactive command line interface toolkit for C#
Stars: ✭ 197 (-96.41%)
Mutual labels:  cli, interactive
Bit
Bit is a modern Git CLI
Stars: ✭ 5,723 (+4.26%)
Mutual labels:  cli, interactive
Survey
A golang library for building interactive and accessible prompts with full support for windows and posix terminals.
Stars: ✭ 2,843 (-48.21%)
Mutual labels:  cli, interactive
Bullet
🚅 Interactive prompts made simple. Build a prompt like stacking blocks.
Stars: ✭ 3,257 (-40.66%)
Mutual labels:  cli, interactive
Go Prompt
Building powerful interactive prompts in Go, inspired by python-prompt-toolkit.
Stars: ✭ 4,255 (-22.48%)
Mutual labels:  cli, interactive
Qoa
Minimal interactive command-line prompts
Stars: ✭ 2,007 (-63.44%)
Mutual labels:  cli, interactive
Npm Upgrade
Interactive CLI utility to easily update outdated NPM dependencies
Stars: ✭ 245 (-95.54%)
Mutual labels:  cli, interactive
Ink
🌈 React for interactive command-line apps
Stars: ✭ 17,505 (+218.91%)
Mutual labels:  cli, interactive
Php Console
🖥 PHP CLI application library, provide console argument parse, console controller/command run, color style, user interactive, format information show and more. 功能全面的PHP命令行应用库。提供控制台参数解析, 命令运行,颜色风格输出, 用户信息交互, 特殊格式信息显示
Stars: ✭ 310 (-94.35%)
Mutual labels:  cli, interactive
Add Gitignore
An interactive CLI tool that adds a .gitignore to your projects.
Stars: ✭ 467 (-91.49%)
Mutual labels:  cli, interactive
Postcss Cli
CLI for postcss
Stars: ✭ 621 (-88.69%)
Mutual labels:  cli
Marp Cli
A CLI interface for Marp and Marpit based converters
Stars: ✭ 606 (-88.96%)
Mutual labels:  cli
Readline Sync
Synchronous Readline for interactively running to have a conversation with the user via a console(TTY).
Stars: ✭ 601 (-89.05%)
Mutual labels:  interactive
Iruby
Official gem repository: Ruby kernel for Jupyter/IPython Notebook
Stars: ✭ 600 (-89.07%)
Mutual labels:  interactive
Motion
javascript cli: fast, configurable, easy, with hmr
Stars: ✭ 626 (-88.6%)
Mutual labels:  cli
Rdrview
Firefox Reader View as a command line tool
Stars: ✭ 622 (-88.67%)
Mutual labels:  cli
Ponzu
Headless CMS with automatic JSON API. Featuring auto-HTTPS from Let's Encrypt, HTTP/2 Server Push, and flexible server framework written in Go.
Stars: ✭ 5,373 (-2.11%)
Mutual labels:  cli
Gitkit Js
Pure javascript implementation of Git (Node.js and Browser)
Stars: ✭ 597 (-89.12%)
Mutual labels:  cli
Autocomplete
Autocomplete for terminals on MacOS
Stars: ✭ 569 (-89.63%)
Mutual labels:  cli

Vorpal

Build Status NPM Downloads Package Quality NPM Version XO code style

Conquer the command-line.

              (O)
              <M
   o          <M
  /| ......  /:M\------------------------------------------------,,,,,,
(O)[ vorpal ]::@+}==========================================------------>
  \| ^^^^^^  \:W/------------------------------------------------''''''
   o          <W
              <W
              (O)

Vorpal is Node's first framework for building interactive CLI applications. With a simple and powerful API, Vorpal opens the door to a new breed of rich, immersive CLI environments like cash and wat.

Notice

This is now an OPEN Open Source project. I am not able to invest a significant amount of time into maintaining Vorpal and so am looking for volunteers who would like to be active maintainers of the project. If you are interested, shoot me a note.

Contents

Introduction

Inspired by and based on commander.js, Vorpal is a framework for building immersive CLI applications built on an interactive prompt provided by inquirer.js. Vorpal launches Node into an isolated CLI environment and provides a suite of API commands and functionality including:

  • Simple, powerful command creation
  • Supports optional, required and variadic arguments and options
  • Piped commands
  • Persistent command history
  • Built-in help
  • Built-in tabbed auto-completion
  • Command-specific auto-completion
  • Customizable prompts
  • Extensive terminal control
  • Custom event listeners
  • And more

Vorpal supports community extensions, which empower it to do awesome things such as piping commands to less, importing commands live or supporting a built-in REPL.

Made with ❤️ by dthree.

Getting Started

Quick Start

Install vorpal into your project:

$ npm install vorpal --save

Create a .js file and add the following:

const vorpal = require('vorpal')();

vorpal
  .command('foo', 'Outputs "bar".')
  .action(function(args, callback) {
    this.log('bar');
    callback();
  });

vorpal
  .delimiter('myapp$')
  .show();

This creates an instance of Vorpal, adds a command which logs "bar", sets the prompt delimiter to say "myapp$", and shows the prompt.

Run your project file. Your Node app has become a CLI:

$ node server.js
myapp~$

Try out your "foo" command.

myapp~$ foo
bar
myapp~$

Now type "help" to see Vorpal's built in commands in addition to "foo":

myapp~$ help

  Commands

    help [command]    Provides help for a given command.
    exit [options]    Exits instance of Vorpal.
    foo               Outputs "bar".

myapp~$

There's the basics. Once you get the hang of it, follow this tutorial or read on to learn what else Vorpal can do.

Community

Questions? Use the vorpal.js StackOverflow tag for fast answers that help others, or jump into chat on Gitter.

API

Command
Mode
Catch
CommandInstance
UI
Vorpal
Events

Extensions

You can build your own Vorpal commands and extensions.

FAQ

Why Vorpal?

One, two! One, two! and through and through
The vorpal blade went snicker-snack!
He left it dead, and with its head
He went galumphing back.

Lewis Carroll, Jabberwocky
Life Goals:
  • Build a popular framework based on the Jabberwocky poem.

License

MIT © David Caccavella

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