If I was making an interactive command line, I think I'd want to do it all in shell. Let's say it's a CLI that interacts with a remote server, then I might have a "script" that "starts" a custom CLI by doing: #!/usr/bin/env bash export REMOTE_ADDR="$1" export PATH="$(dirname $0)/commands:$PATH" export PS1='service:\$ ' bash Now you do something like: $ server-cli https://myservice.com service:$ which upload /path/to/…
Vorpal, a framework for building CLIs
11–20 of 43 posts
Re: Vorpal, a framework for building CLIs
#12Start from scratch just because you don't want to read the manual of the right technology, convince lots of people to adopt with a cool site, spend the next 5 years updating your project to get to 10% of the 20yr old projects you ignored.
disclaimer: mostly javascript developer nowadays. but salty.
Re: Vorpal, a framework for building CLIs
#13Author of Vorpal here. You can ask me Qs if you'd like.
Re: Vorpal, a framework for building CLIs
#14ah, the javascript developer mindset applied to CLI development. Start from scratch just because you don't want to read the manual of the right technology, convince lots of people to adopt with a cool site, spend the next 5 years updating your project to get to 10% of the 20yr old projects you ignored. disclaimer: mostly javascript developer nowadays. but salty.
Re: Vorpal, a framework for building CLIs
#15Author of Vorpal here. You can ask me Qs if you'd like.
I see option autocompletion is provided as a service by the framework. What about tab-completion of paths?
Re: Vorpal, a framework for building CLIs
#16ah, the javascript developer mindset applied to CLI development. Start from scratch just because you don't want to read the manual of the right technology, convince lots of people to adopt with a cool site, spend the next 5 years updating your project to get to 10% of the 20yr old projects you ignored. disclaimer: mostly javascript developer nowadays. but salty.
My problem is with npm and nodejs dependency, for writing CLI, which essentially means you have to install nodejs and is probably only really useful for nodejs developers.
My purpose in writing Vorpal is to make building CLIs accessible to a wider audience. While haters will hate JS, it nevertheless has a very broad use and accessibility.
Re: Vorpal, a framework for building CLIs
#17If I was making an interactive command line, I think I'd want to do it all in shell. Let's say it's a CLI that interacts with a remote server, then I might have a "script" that "starts" a custom CLI by doing: #!/usr/bin/env bash export REMOTE_ADDR="$1" export PATH="$(dirname $0)/commands:$PATH" export PS1='service:\$ ' bash Now you do something like: $ server-cli https://myservice.com service:$ which upload /path/to/…
True. Though in Node, you can make calls to standard programs, so it can act pretty seamlessly. And there's already a lot of direction towards supporting a lot of familiar methods and more. Like this: https://www.npmjs.com/package/cash
Re: Vorpal, a framework for building CLIs
#18If I was making an interactive command line, I think I'd want to do it all in shell. Let's say it's a CLI that interacts with a remote server, then I might have a "script" that "starts" a custom CLI by doing: #!/usr/bin/env bash export REMOTE_ADDR="$1" export PATH="$(dirname $0)/commands:$PATH" export PS1='service:\$ ' bash Now you do something like: $ server-cli https://myservice.com service:$ which upload /path/to/…
True. Though in Node, you can make calls to standard programs, so it can act pretty seamlessly. And there's already a lot of direction towards supporting a lot of familiar methods and more. Like this: https://www.npmjs.com/package/cash
Re: Vorpal, a framework for building CLIs
#19Author of Vorpal here. You can ask me Qs if you'd like.
How are globals used in the vorpal codebase? Is it going to be easier to write my tests (and actually get code coverage with istanbul working)?
I like the site, and the API overview. The library looks nice!
Re: Vorpal, a framework for building CLIs
#20Author of Vorpal here. You can ask me Qs if you'd like.
I've had a pretty bad time trying to get code coverage with my cli tests. I've ended up using spawn() in my test cases due to most libraries using process.exit() / process.stdout.write() and console.log() (instead of picking one and sticking with it). How are globals used in the vorpal codebase? Is it going to be easier to write my tests (and actually get code coverage with istanbul working)? I like the site, and the…
Yeah, it's got stdout piping methods, etc. which make it easy. It's also got UI manipulation methods so you can simulate user action. I haven't particularly had any trouble writing tests, but really it depends on your use case, which I'm not familiar with.