Using AutoCommand for commands, it still needs more testing