You're mixing framework classes with CLI implementation.