1 import { registerTSPaths } from '../../server/helpers/register-ts-paths'
4 import { initDatabaseModels } from '../../server/initializers/database'
5 import { program } from 'commander'
6 import { PluginManager } from '../../server/lib/plugins/plugin-manager'
9 .option('-n, --npm-name [npmName]', 'Package name to install')
12 const options = program.opts()
14 if (!options.npmName) {
15 console.error('You need to specify the plugin name.')
20 .then(() => process.exit(0))
26 async function run () {
28 await initDatabaseModels(true)
30 const toUninstall = options.npmName
31 await PluginManager.Instance.uninstall(toUninstall)