-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Hi! For trpc-cli, I'd like to support properties like useMCPServer: z.string() nicely. Right now, the only way to get commander to parse an option into program.opts().useMCPServer is to define an option --use-m-c-p-server which is horrible looking.
It'd be nice if I could do something like this:
const option = new Option('--use-mcp-server', {attributeName: 'useMCPServer'})I'm trying a workaround in trpc-cli by sub-classing Option and overriding attributeName(), but it seems a bit brittle: https://github.com/mmkal/trpc-cli/pull/149/files#diff-a2a171449d862fe29692ce031981047d7ab755ae7f84c707aef80701b3ea0c80R287
Metadata
Metadata
Assignees
Labels
No labels