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