Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better cli help #722

Closed
GuidoS opened this issue Apr 30, 2016 · 18 comments
Closed

better cli help #722

GuidoS opened this issue Apr 30, 2016 · 18 comments

Comments

@GuidoS
Copy link

GuidoS commented Apr 30, 2016

Could the bin possibly use yargs to document commands and options? I would be happy to help make this happen, just want to make sure that this type of update would be accepted as a pull request. My thought is that yargs does a really nice job of self documenting commands and options and the current '-h' help option is pretty lacking.

@johnnyman727
Copy link
Contributor

@GuidoS I agree with you completely about the poor --help output. We've been meaning to switch to commander for a while but haven't gotten around to it. Would you be willing to do that instead of yargs?

@johnnyman727
Copy link
Contributor

Since October in fact! #356

@GuidoS
Copy link
Author

GuidoS commented May 1, 2016

I would like to convince you that yargs is a better choice:

  • It's a more active a project (last updated 19 days ago) (from npmcompare)
  • it's got json argument passing, similar to what you have already done in nomnom

nomnom

    .option('timeout', {
        abbr: 't',
        metavar: 'TIMEOUT', // not sure what this is for?
        help: 'Set timeout in seconds for scanning for networked tessels',
        default: 5   
    })

commander

  .option('-t, --timeout', 'Set timeout in seconds for scanning for networked tessels')
  // no default options

yargs

  .option('timeout', {
    alias: 't',
    describe:'Set timeout in seconds for scanning for networked tessels',
    default: 5
  }
  • I have used yargs on other projects and it is very newb friendly
  • Pirate themed, but no actual pirates (cause real pirates were frightening and not fun)

@johnnyman727
Copy link
Contributor

Sounds reasonable to me! 👍

@GuidoS
Copy link
Author

GuidoS commented May 1, 2016

To be clear, if i spend the time making this update, and it works, you can
assure me that it will be accepted?

On Sun, May 1, 2016, 7:19 AM Jon [email protected] wrote:

Sounds reasonable to me! [image: 👍]


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#722 (comment)

@johnnyman727
Copy link
Contributor

Yeah, I am okay with it but I don't have much experience with yargs. @rwaldron or @LinusU or @Frijol or @HipsterBrown might have more experience and thus objections. I'd say wait 24 hours and if you don't hear any dissent from them, we're good to go.

@HipsterBrown
Copy link
Contributor

I believe we were looking to switch to commander because of deprecation notice in the nomnom repo. Based on @GuidoS's reasoning, it looks like yargs would be an easier transition and more approachable for new contributors. 👍 for the update.

@wyze
Copy link
Member

wyze commented May 2, 2016

I've only ever used meow, but if Sindre recommends yargs (#356 (comment)), then I say that would be good enough for us. 👍

@rwaldron
Copy link
Contributor

rwaldron commented May 3, 2016

Re: metavar... https://github.com/harthur/nomnom#metavar

@johnnyman727
Copy link
Contributor

@guido since nobody has strong opinions, let's move forward with 'yargs'.

@GuidoS
Copy link
Author

GuidoS commented May 4, 2016

OK, I will get going on this next week, I'm slammed right now...

@GuidoS
Copy link
Author

GuidoS commented May 13, 2016

I am new to contributing code with these community tools. I have setup a branch on my personal fork and am working there:
https://github.com/GuidoS/t2-cli/tree/bin-yargs-integration

Once I have the functionality fully functional I will do a pull request. Is this the correct way to do this? Is there a CONTRIBUTE.md somewhere?

@wyze
Copy link
Member

wyze commented May 13, 2016

Yes, it is just in a different repo: https://github.com/tessel/project/blob/master/CONTRIBUTING.md

And then you will also need to sign the CLA.

@GuidoS
Copy link
Author

GuidoS commented May 13, 2016

I have signed it ;)

On Fri, May 13, 2016, 8:05 AM Neil Kistner [email protected] wrote:

Yes, it is just in a different repo:
https://github.com/tessel/project/blob/master/CONTRIBUTING.md

And then you will also need to sign the CLA
http://dojofoundation.org/about/claForm.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#722 (comment)

@johnnyman727
Copy link
Contributor

@GuidoS were you able to make any progress on this?

@bcoe
Copy link

bcoe commented Aug 9, 2016

@johnnyman727 @GuidoS I'm a little biased, so not going to make too noisy of a pitch for yargs. But, I'm here to help if you need me.

@GuidoS
Copy link
Author

GuidoS commented Aug 10, 2016

This has been back burnered for me. I will make some time this weekend to get the ball rolling and would be happy to get support from others.

@GuidoS
Copy link
Author

GuidoS commented Apr 26, 2018

looks like this was deprecated, so I will happily close this.

@GuidoS GuidoS closed this as completed Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants