Add private CommandInvocation API
Start using CommandInvocation internally