1 import { program } from 'commander'
2 import { initDatabaseModels } from '../../server/initializers/database'
3 import { PluginManager } from '../../server/lib/plugins/plugin-manager'
6 .option('-n, --npm-name [npmName]', 'Package name to install')
9 const options = program.opts()
11 if (!options.npmName) {
12 console.error('You need to specify the plugin name.')
17 .then(() => process.exit(0))
23 async function run () {
25 await initDatabaseModels(true)
27 const toUninstall = options.npmName
28 await PluginManager.Instance.uninstall(toUninstall)