```ruby
commands = constants.map { |c| const_get(c) }.select { |c| c <= HammerCLI::AbstractCommand }
```
would be more effective I think

Are subcommands in some module or in global space?