It should be pretty straightforward to just throw this at a command table, though how this works for subcommands is still an open question