Skip to content
This repository was archived by the owner on Aug 30, 2024. It is now read-only.

Migrate to urfave/cli #85

Closed
cmoog opened this issue Jul 31, 2020 · 6 comments · Fixed by #86
Closed

Migrate to urfave/cli #85

cmoog opened this issue Jul 31, 2020 · 6 comments · Fixed by #86
Assignees
Labels
enhancement New feature or request

Comments

@cmoog
Copy link
Contributor

cmoog commented Jul 31, 2020

Although https://github.com/cdr/cli offers a minimal wrapper, it's becoming clear that it lacks sufficient features for the growing scope of coder-cli. I propose we migrate to https://github.com/spf13/cobra https://github.com/urfave/cli. Consider a few advantages that we'll gain "out of the box".

  • Suggestions when "unknown command" happens
  • bash, zsh, fish, and powershell completion generation
  • well designed and standard command validation abstractions
  • better persistent flag abstractions
  • no more interface upgrading nonsense
  • the model of a separate type per command is flawed and, given the lack of generics, is very difficult to abstract

Any thoughts / objections? cc @scsmithr @nhooyr @ammario

@cmoog cmoog added the enhancement New feature or request label Jul 31, 2020
@cmoog cmoog self-assigned this Jul 31, 2020
@ammario
Copy link
Member

ammario commented Jul 31, 2020

I leave my vote to @nhooyr

@nhooyr
Copy link
Contributor

nhooyr commented Jul 31, 2020

So we discussed and we're gonna go with urfave/cli for more features and and improved API design that doesn't depend heavily on globals/init functions in comparison with cobra.

@nhooyr
Copy link
Contributor

nhooyr commented Jul 31, 2020

While cdr/cli is nice and minimal, it's definitely missing very useful features for users, especially in regards to completions and general UX.

@scsmithr
Copy link
Contributor

I'm down to switch to whatever if y'all think it's an improvement.

@cmoog cmoog changed the title Migrate to cobra Migrate to urfave/cli Jul 31, 2020
@cmoog cmoog mentioned this issue Jul 31, 2020
@coadler
Copy link
Contributor

coadler commented Jul 31, 2020

+1 for urfave over cobra

@exvuma
Copy link

exvuma commented Aug 3, 2020

Tagging @khorne3 since this could help how she docs the CLI

@cmoog cmoog closed this as completed in #86 Aug 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants