You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A required object option shows as optional in --help #230
A required string field in the input schema gets an option like --name <string>, which trpc-cli makes mandatory. A required object field gets --contract [json] instead, written as an optional value, and its option is not made mandatory. Leaving it out is then caught only by the schema, not by Commander as a missing option:
In trpc-cli 0.17.1, an option's value name gets its brackets from bracketise (src/index.ts#L433): angle brackets for a required option, square ones otherwise. Strings, numbers, enums and untyped values go through it, but an object keeps [json], the value name every option starts with (#L467). Since only a flag with angle brackets is made mandatory (#L479), a required object option is neither shown nor enforced as required. Starting the value name from bracketise('json') instead of '[json]' would fix both.
Activity
pullfrog commentedon Oct 23, 2026