move cli/plugin to separate file