unjs / citty

🌆 Elegant CLI Builder
Other
729 stars 23 forks source link

Create shared args for all `subCommands` in main #154

Open fu050409 opened 2 months ago

fu050409 commented 2 months ago

Describe the feature

Hi!

Sometimes we need to create global args because all subcommands will use them. It's complex and duplicate if we define them in all of our subCommands' defination.

Can we provide an api to create shared args?

Additional information

zuixinwang commented 1 month ago

image maybe you can call the generateArgs function to do this outside citty