Alternatively we can create yet another help comma...
# general
h
Alternatively we can create yet another help command (
help-json
or something) which seems very extra. We already have a lot going on.
h
this seems like it should be an option to
help
rather than a new top-level command
👍 1
h
help
is special though, it's not a goal, and its options are special-cased
👍 1
You can do
--help-all
as well
h
Hm, it would indeed be nice if you could run
./pants help pytest --json
. Ik it’s hard to implement, but if we were to start from scratch, I’d want that feature.
h
We try to understand every possible request for help (
help
,
-h
,
--help
etc)
That seems overspecified. We might as well just dump out one big JSON blob and let you pick out the bits you need.
The structure of the big JSON blob and the little one would have to be the same anyway.
👍 1
The little one would just have less data in it, but you'd still have to know how to drill down into it.
So at that point, is there value in dumping partial data?
h
That’s fair
h
Basically the way it works today is we strip out any help commands/flags from the args, and special-case them
adding
--json
to that list seems risky
It means no goal can have a
--json
flag
👍 2
h
Okay, that’s a non-starter
Yeah, sounds good for
help-all
to output JSON. I think we should mention JQ in the docs, though, as some devs might not be familiar with it and aren’t used to a CLI tool outputting an enormous blob of JSON meant to be consumed by humans
👍 1
h
Sure
h
jq's a great tool and informing more people about it is a public good
💯 1