Live data from Hacker News

Vorpal, a framework for building CLIs

vorpal.js.org

21–30 of 43 posts

Re: Vorpal, a framework for building CLIs

#21
post #12

ah, 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.

But a benefit might be cross-platform compatibility seeing as some OSes don't come with, say, grep out of the box. While you could use the native tools, there could be some benefit to writing your own to do exactly what you want consistently.

I don't really disagree with you, but just pointing out there is some benefit to writing one's own CLI.

Re: Vorpal, a framework for building CLIs

#22
post #16
post #14

Earlier quoted context omitted.

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.

I can understand that. Fortunately, Node is becoming huge in terms of CLI - there's a ton of really useful CLI apps for all kinds of things. To the point where it becomes advantageous to have NPM installed, Node developer or not. At that point, installation of a CLI app is easier and more uniform than many other methods. My 0.02. My purpose in writing Vorpal is to make building CLIs accessible to a wider audience. Wh…

As a Python developer I have not found a single library out there (I tried almost every single popular one out there) helps me write better CLI so I always fall back to argparse.

Since every up-to-date Linux system is shipped with Python, and argparse is part of the stdlib, I don't need to worry about argparse not being available. NodeJs adoption is going up, but if someone is building a CLI for a Rust project using Vorpal, then I have to install another piece of software and bloat my local system. Imagine this goes into my docker container it means the overall size of my container will increase. Of course I typically also install a bunch of packages along with my Python project anyway, like requests library, but because these libraries are typically needed for my backend anyway, the CLI's dependency on requests library is debt free. But in the case of me writing a Rust / Go / Python project but shipping a NodeJS CLI version, that's pretty insane. But don't take this the wrong way, I will write NodeJs and I will look at your library. You have great work, but I want to offer you my opinion on why few people outside of NodeJs will use this to build CLI for their X-language project.

Re: Vorpal, a framework for building CLIs

#23
post #22
post #16

Earlier quoted context omitted.

I can understand that. Fortunately, Node is becoming huge in terms of CLI - there's a ton of really useful CLI apps for all kinds of things. To the point where it becomes advantageous to have NPM installed, Node developer or not. At that point, installation of a CLI app is easier and more uniform than many other methods. My 0.02. My purpose in writing Vorpal is to make building CLIs accessible to a wider audience. Wh…

As a Python developer I have not found a single library out there (I tried almost every single popular one out there) helps me write better CLI so I always fall back to argparse. Since every up-to-date Linux system is shipped with Python, and argparse is part of the stdlib, I don't need to worry about argparse not being available. NodeJs adoption is going up, but if someone is building a CLI for a Rust project using…

I see that point of view - that makes sense.

Re: Vorpal, a framework for building CLIs

#24
post #21
post #12

ah, 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.

But a benefit might be cross-platform compatibility seeing as some OSes don't come with, say, grep out of the box. While you could use the native tools, there could be some benefit to writing your own to do exactly what you want consistently. I don't really disagree with you, but just pointing out there is some benefit to writing one's own CLI.

I think its easier to install cygwin than replace all the command line tools I am used to with Javascript equivalents.

Re: Vorpal, a framework for building CLIs

#25

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/…

Pretty neat. Just need to remember to restore the environment variables afterwards, especially $PATH.

Re: Vorpal, a framework for building CLIs

#26
post #24
post #21

Earlier quoted context omitted.

But a benefit might be cross-platform compatibility seeing as some OSes don't come with, say, grep out of the box. While you could use the native tools, there could be some benefit to writing your own to do exactly what you want consistently. I don't really disagree with you, but just pointing out there is some benefit to writing one's own CLI.

I think its easier to install cygwin than replace all the command line tools I am used to with Javascript equivalents.

Having installed cygwin, I’m not so sure. :P

Re: Vorpal, a framework for building CLIs

#27
post #24
post #21

Earlier quoted context omitted.

But a benefit might be cross-platform compatibility seeing as some OSes don't come with, say, grep out of the box. While you could use the native tools, there could be some benefit to writing your own to do exactly what you want consistently. I don't really disagree with you, but just pointing out there is some benefit to writing one's own CLI.

I think its easier to install cygwin than replace all the command line tools I am used to with Javascript equivalents.

[deleted]

Re: Vorpal, a framework for building CLIs

#28
post #24
post #21

Earlier quoted context omitted.

But a benefit might be cross-platform compatibility seeing as some OSes don't come with, say, grep out of the box. While you could use the native tools, there could be some benefit to writing your own to do exactly what you want consistently. I don't really disagree with you, but just pointing out there is some benefit to writing one's own CLI.

I think its easier to install cygwin than replace all the command line tools I am used to with Javascript equivalents.

Sure if you want a full set of native tools I won't suggest otherwise. But a full cygwin install is way more invasive than node, and if you just want some specific tools, vorpal might be for you. Or maybe cygwin is. Whatever works for you.
Post reply on HN