Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@thdxr I saw in one of your tweet replies you mentioned ability to export a CLI to json for generating website docs etc.
I had this in a local branch but never really bothered with it because 1) it really only operates on a
commander
Command rather than anything trpc-cli specific and 2) it's pretty trivial to implement in userland (you can get the commander Command from trpc-cli too) - but I don't see it being a problem/difficult to maintain.Is this actually useful enough vs you just doing it yourself? you can already do:
Note: this exports the cli to json, not the trpc router. trpc-to-json is something this library more or less does internally but and could in theory be extracted to build trpc-to-openapi type things too, but designing for use other than for CLIs would take more work.