cmd-ts
cmd-ts copied to clipboard
allow `subcommands` to be built/executed lazily
Something like:
-
dynamic command implementations will allow to lazily load the dependency tree instead of forcing cmd-ts apps to be imported sync
subcommands({ cmds: { hello: async () => (await import('./my-command')).cmd } })
-
async functions for the different commands can allow to lazily bootstrap the CLI
subcommands({ cmds: () => Promise.resolve({ hello: ... }) })
-
mixing them both can allow extremely dynamic applications 😮