Tim Oxley edited this page Dec 7, 2016 · 17 revisions

API

vorpal

Basic methods for a Vorpal instance, including an API for argument parsing, prompt control, logging, extensions and automation.

vorpal.command

Create and customize the commands for your interactive CLI.

vorpal.mode

A special type of command that puts the user into a mode where-in everything typed is taken as a literal command.

vorpal.catch

A special type of command that's fired when the user runs text that hasn't been registered as a command.

vorpal.ui

Tools for direct and easy manipulation of your screen, including editing the prompt, user input and re-drawing the screen.

CommandInstance

When a command is fired in Vorpal a commandInstance is created and exposed through the this in the context of the command. The instance exposes methods for logging and prompting mid-command.


Creating Extensions

You can build and publish your own extensions for Vorpal.

Events

Vorpal is an event emitter and exposes custom events, useful for a programmatic control of Vorpal.

FAQ

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.