Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
15 views

In Vorpal.js Auto complete will not work in option to search the file names

I like the some features in vorpal like Custom Delimiter, Banner and handling command and options. But auto-complete will not work for option to search the filesystem. Eg: Vorpal$ open -f ../[file-...
Vivek G.S's user avatar
0 votes
5 answers
911 views

How to convert an input of type string into type object array in node js

I am creating a cli app & I get an input from the user : print [{name:'joe', age:19}] where arg = [{name:'joe', age:19}] But when I do typeof arg, it returns string. I tried using json.parse [...
Endemic's user avatar
  • 370
0 votes
1 answer
109 views

Log function not working in cli app using vorpal js

I am creating a cli app using node js & vorpal. There is no syntax error or warnings and everything works perfectly except that vorpal log doesn't work. Below is a small code snippet. //...
Endemic's user avatar
  • 370
26 votes
2 answers
27k views

create nodejs cli select/options menu

How do you create an arrow-key menu list? I'm looking for something like after entering in eslint init or create-react-app <project>? (see images below) ESlint yeoman Searching around to ...
Chance Smith's user avatar
  • 1,251
8 votes
1 answer
431 views

Vorpal Commands Context

I am working on a command line application based on Vorpal (http://vorpal.js.org/) and thus NodeJs. I was wondering whether there was a way to allow (and list in the help) commands depending on a ...
Andrea Sindico's user avatar
1 vote
2 answers
458 views

Close Vorpal instance programmatically

This regards the vorpal CLI for node.js, like so: const vorpal = require('vorpal')(); The user can close vorpal with Ctrl-C, but how can I close vorpal programmatically? For example, if a vorpal ...
Alexander Mills's user avatar
0 votes
1 answer
178 views

Reloading lorenwest's NodeJS config module

I need to reload the config lorenwests config module in multiple files if someone sends the reload command. To achieve that, I followed this issue but it didn't work out for me. I'm working on NodeJS ...
I'm a retard's user avatar
0 votes
0 answers
153 views

Async.map in vorpal command line

I'm creating a command line in node js so I'm using Vorpal to do so but I have a problem when I try to use Async library (Async.map) so the command line never stops. So here is my code: First I use ...
Giancarlo Corzo's user avatar
0 votes
1 answer
137 views

calling another function during vorpal action

I have just started using Vorpal.js to help build a CLI tool which will ultimately preform a HTTP request against an API endpoint. I have it asking questions and validating data input, but once I ...
chinds's user avatar
  • 1,799
1 vote
1 answer
1k views

Vorpal - how to execute a command with a prompt

I'm currently using a 3rd party application that uses Vorpal in REPL mode. I'm trying to automate some deployment configuration for use in my project using the exec function in Vorpal. Everything is ...
gretro's user avatar
  • 1,999
1 vote
1 answer
314 views

How do I run code on exiting a Vorpal.js app?

I'm writing a vorpal.js app that loads a file on launch, and should write a modified version of the file on exit. How do I run code on exit? Is there some place I can attach a callback or something?
Josh's user avatar
  • 2,069
4 votes
1 answer
3k views

Sequelize and Feathers: When Relationships Fall Apart

After two days of trying to figure out why my Sequelize models aren't committed to their relationships, I've decided it was time to ask y'all for advice. Here's the story. I'm writing a Feathers JS ...
Chris V.'s user avatar
3 votes
1 answer
457 views

How to separate commands into files Vorpal.js

I have many commands and each of them is long. For example, I have: create read update delete I want to put them in separate files: ./commands/create.js ./commands/read.js ./commands/update.js ./...
Minh Chu's user avatar
  • 289
1 vote
1 answer
118 views

Vorpal very long parameter gets cut

I've created a Vorpal command: vorpal.command('getURL <url>') The problem is when i pass a very long URL it gets cut. I believe there is some restriction on the length of the parameter. Is ...
Asiat's user avatar
  • 401
3 votes
2 answers
191 views

Is it possible to restart a Vorpal application from the Vorpal prompt?

Say we wanted to restart the Vorpal app from within the prompt. Eg with a command: > restart I have tried different things including executing a shell script that kills the process and executes ...
Thomas Andersen's user avatar

15 30 50 per page