{"id":13431130,"url":"https://github.com/dthree/vorpal","last_synced_at":"2025-05-13T18:05:47.072Z","repository":{"id":46310849,"uuid":"41258890","full_name":"dthree/vorpal","owner":"dthree","description":"Node's framework for interactive CLIs","archived":false,"fork":false,"pushed_at":"2023-09-19T15:51:28.000Z","size":983,"stargazers_count":5643,"open_issues_count":137,"forks_count":279,"subscribers_count":63,"default_branch":"master","last_synced_at":"2025-04-25T14:50:31.839Z","etag":null,"topics":["cli","interactive","node","shell"],"latest_commit_sha":null,"homepage":"http://vorpal.js.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dthree.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2015-08-23T17:08:20.000Z","updated_at":"2025-04-24T08:24:07.000Z","dependencies_parsed_at":"2022-07-25T03:46:50.733Z","dependency_job_id":"ed38c0f9-40a2-4cf1-8a58-1c289c915bcd","html_url":"https://github.com/dthree/vorpal","commit_stats":{"total_commits":393,"total_committers":35,"mean_commits":"11.228571428571428","dds":"0.32061068702290074","last_synced_commit":"51f5e2b545631b6a86c9781c274a1b0916a67ee8"},"previous_names":[],"tags_count":61,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fvorpal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fvorpal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fvorpal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dthree%2Fvorpal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dthree","download_url":"https://codeload.github.com/dthree/vorpal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254000845,"owners_count":21997441,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","interactive","node","shell"],"created_at":"2024-07-31T02:01:00.735Z","updated_at":"2025-05-13T18:05:47.054Z","avatar_url":"https://github.com/dthree.png","language":"JavaScript","readme":"# Vorpal\r\n\r\n\r\n[![Build Status](https://travis-ci.org/dthree/vorpal.svg)](https://travis-ci.org/dthree/vorpal/)\r\n\u003ca href=\"https://www.npmjs.com/package/vorpal\"\u003e\r\n  \u003cimg src=\"https://img.shields.io/npm/dt/vorpal.svg\" alt=\"NPM Downloads\" /\u003e\r\n\u003c/a\u003e\r\n[![Package Quality](http://npm.packagequality.com/shield/vorpal.svg)](http://packagequality.com/#?package=vorpal)\r\n\u003ca href=\"https://www.npmjs.com/package/vorpal\"\u003e\r\n  \u003cimg src=\"https://img.shields.io/npm/v/vorpal.svg\" alt=\"NPM Version\" /\u003e\r\n\u003c/a\u003e\r\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)\r\n\r\n\u003e Conquer the command-line.\r\n\r\n```text\r\n              (O)\r\n              \u003cM\r\n   o          \u003cM\r\n  /| ......  /:M\\------------------------------------------------,,,,,,\r\n(O)[ vorpal ]::@+}==========================================------------\u003e\r\n  \\| ^^^^^^  \\:W/------------------------------------------------''''''\r\n   o          \u003cW\r\n              \u003cW\r\n              (O)\r\n```\r\n\r\nVorpal 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](https://github.com/dthree/cash) and [wat](https://github.com/dthree/wat).\r\n\r\n## Notice\r\n\r\nThis is now an [OPEN Open Source](http://openopensource.org/) 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.\r\n\r\n## Contents\r\n\r\n* [Introduction](#introduction)\r\n* [Getting Started](#getting-started)\r\n* [API](#api)\r\n* [Extensions](#extensions)\r\n* [FAQ](#faq)\r\n* [License](#license)\r\n\r\n## Introduction\r\n\r\nInspired by and based on [commander.js](https://www.npmjs.com/package/commander), Vorpal is a framework for building immersive CLI applications built on an interactive prompt provided by [inquirer.js](https://www.npmjs.com/package/inquirer). Vorpal launches Node into an isolated CLI environment and provides a suite of API commands and functionality including:\r\n\r\n* [x] Simple, powerful command creation\r\n* [x] Supports optional, required and variadic arguments and options\r\n* [x] Piped commands\r\n* [x] Persistent command history\r\n* [x] Built-in help\r\n* [x] Built-in tabbed auto-completion\r\n* [x] Command-specific auto-completion\r\n* [x] Customizable prompts\r\n* [x] Extensive terminal control\r\n* [x] Custom event listeners\r\n* [x] And more\r\n\r\nVorpal supports [community extensions](https://github.com/vorpaljs/awesome-vorpaljs), which empower it to do awesome things such as [piping commands to less](https://github.com/vorpaljs/vorpal-less), [importing commands live](https://github.com/vorpaljs/vorpal-use) or supporting a [built-in REPL](https://github.com/vorpaljs/vorpal-repl).\r\n\r\nMade with :heart: by [dthree](https://github.com/dthree).\r\n\r\n## Getting Started\r\n\r\n##### Quick Start\r\n\r\nInstall `vorpal` into your project:\r\n\r\n```bash\r\n$ npm install vorpal --save\r\n```\r\n\r\nCreate a `.js` file and add the following:\r\n\r\n```js\r\nconst vorpal = require('vorpal')();\r\n\r\nvorpal\r\n  .command('foo', 'Outputs \"bar\".')\r\n  .action(function(args, callback) {\r\n    this.log('bar');\r\n    callback();\r\n  });\r\n\r\nvorpal\r\n  .delimiter('myapp$')\r\n  .show();\r\n```\r\nThis creates an instance of Vorpal, adds a command which logs \"bar\", sets the prompt delimiter to say \"myapp$\", and shows the prompt.\r\n\r\nRun your project file. Your Node app has become a CLI:\r\n\r\n```bash\r\n$ node server.js\r\nmyapp~$\r\n```\r\n\r\nTry out your \"foo\" command.\r\n\r\n```bash\r\nmyapp~$ foo\r\nbar\r\nmyapp~$\r\n```\r\n\r\nNow type \"help\" to see Vorpal's built in commands in addition to \"foo\":\r\n\r\n```bash\r\nmyapp~$ help\r\n\r\n  Commands\r\n\r\n    help [command]    Provides help for a given command.\r\n    exit [options]    Exits instance of Vorpal.\r\n    foo               Outputs \"bar\".\r\n\r\nmyapp~$\r\n```\r\n\r\nThere's the basics. Once you get the hang of it, [follow this tutorial](http://developer.telerik.com/featured/creating-node-js-command-line-utilities-improve-workflow/) or read on to learn what else Vorpal can do.\r\n\r\n##### Community\r\n\r\nQuestions? Use the `vorpal.js` StackOverflow tag for fast answers that help others, or jump into chat on Gitter.\r\n\r\n- [Stack Overflow](http://stackoverflow.com/questions/tagged/vorpal.js) \r\n- [Gitter Chat](https://gitter.im/dthree/vorpal?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge) \r\n- [Vorpal extensions](https://github.com/vorpaljs/awesome-vorpaljs#vorpal-extensions) \r\n- [Projects made with Vorpal](https://github.com/vorpaljs/awesome-vorpaljs) \r\n- [Follow @vorpaljs](https://twitter.com/vorpaljs) \r\n\r\n## [API](https://github.com/dthree/vorpal/wiki)\r\n\r\n##### [Command](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command)\r\n- [`vorpal.command`](https://github.com/dthree/vorpal/wiki/api-%7C-vorpal.command#vorpalcommandcommand-description)\r\n- [`command.description`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commanddescriptionstring)\r\n- [`command.alias`](https://github.com/dthree/vorpal/wiki/api-%7C-vorpal.command#commandaliasname-names)\r\n- [`command.parse`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandparseparsefunction)\r\n- [`command.option`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandoptionstring-description)\r\n- [`command.hidden`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandhidden)\r\n- [`command.remove`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandremove)\r\n- [`command.help`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandhelp)\r\n- [`command.autocomplete`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandautocompletearray-or-object-or-function)\r\n- [`command.action`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandactionfunction)\r\n- [`command.cancel`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.command#commandcancelfunction)\r\n\r\n##### [Mode](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode)\r\n- [`vorpal.mode`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal.mode#vorpalmodecommand-description)\r\n- [`mode.delimiter`](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode#modedelimiterstring)\r\n- [`mode.init`](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode#modeinitfunction)\r\n- [`mode.action`](https://github.com/dthree/vorpal/wiki/API-|-vorpal.mode#modeactionfunction)\r\n\r\n##### [Catch](https://github.com/dthree/vorpal/wiki/API-|-vorpal.catch)\r\n- [`vorpal.catch`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal.catch#catchcommand-description)\r\n\r\n##### [CommandInstance](https://github.com/dthree/vorpal/wiki/API-|-CommandInstance)\r\n- [`commandInstance.log`](https://github.com/dthree/vorpal/wiki/API-%7C-CommandInstance#commandinstancelogstring-strings)\r\n- [`commandInstance.prompt`](https://github.com/dthree/vorpal/wiki/API-%7C-CommandInstance#commandinstancepromptobject-callback)\r\n- [`commandInstance.delimiter`](https://github.com/dthree/vorpal/wiki/API-%7C-CommandInstance#commandinstancedelimiterstring)\r\n\r\n##### [UI](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui)\r\n- [`ui.delimiter`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uidelimitertext)\r\n- [`ui.input`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiinputtext)\r\n- [`ui.imprint`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiimprint)\r\n- [`ui.submit`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uisubmittext)\r\n- [`ui.cancel`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uicancel)\r\n- [`ui.imprint`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiimprint)\r\n- [`ui.redraw`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiredrawtext-text)\r\n- [`ui.redraw.clear`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiredrawclear)\r\n- [`ui.redraw.done`](https://github.com/dthree/vorpal/wiki/api-|-vorpal.ui#uiredrawdone)\r\n\r\n##### [Vorpal](https://github.com/dthree/vorpal/wiki/API-|-vorpal)\r\n- [`.parse`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalparseargv-options)\r\n- [`.delimiter`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpaldelimiterstring)\r\n- [`.show`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalshow)\r\n- [`.find`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalfindstring)\r\n- [`.exec`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalexeccommand-callback)\r\n- [`.execSync`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalexecsynccommand-options)\r\n- [`.log`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpallogstring-strings)\r\n- [`.history`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalhistoryid)\r\n- [`.localStorage`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpallocalstorageid)\r\n- [`.help`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalhelpfunction)\r\n- [`.pipe`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpalpipefunction)\r\n- [`.use`](https://github.com/dthree/vorpal/wiki/API-%7C-vorpal#vorpaluseextension)\r\n\r\n##### [Events](https://github.com/dthree/vorpal/wiki/Docs-%7C-Events)\r\n\r\n\r\n## Extensions\r\n\r\nYou can build your own Vorpal commands and extensions.\r\n\r\n- [List of awesome extensions](https://github.com/vorpaljs/awesome-vorpaljs#vorpal-extensions)\r\n- [Building your own extension](https://github.com/dthree/vorpal/wiki/Docs-%7C-Creating-Extensions)\r\n\r\n\r\n## [FAQ](https://github.com/dthree/vorpal/wiki/FAQ)\r\n\r\n- [What is an \"immersive CLI app?\"](https://github.com/dthree/vorpal/wiki/FAQ#what-is-an-immersive-cli-app)\r\n- [Wasn't this called Vantage?](https://github.com/dthree/vorpal/wiki/FAQ#uh-wasnt-this-called-vantage)\r\n\r\n\r\n## Why Vorpal?\r\n\r\n```text\r\nOne, two! One, two! and through and through\r\nThe vorpal blade went snicker-snack!\r\nHe left it dead, and with its head\r\nHe went galumphing back.\r\n\r\nLewis Carroll, Jabberwocky\r\n```\r\n\r\n\r\n##### Life Goals:\r\n\r\n- \u003cs\u003eBuild a popular framework based on the [Jabberwocky](https://en.wikipedia.org/wiki/Jabberwocky) poem.\u003c/s\u003e\r\n\r\n\r\n## License\r\n\r\nMIT © [David Caccavella](https://github.com/dthree)\r\n","funding_links":[],"categories":["JavaScript","Packages","cli","Classics","[JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript)","包","Javascript CLI"],"sub_categories":["CLIs \u0026 Node","Command-line utilities","Useful awesome list for Go cli"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthree%2Fvorpal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdthree%2Fvorpal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdthree%2Fvorpal/lists"}