import { getRootSchema } from './schema'; const Commands: Record = { getRootSchema, }; const args = process.argv.slice(2); if (args.length) { const [commandName, platform] = args; const command = Commands[commandName]; if (command) { command(platform); } } type Command = (platform: any) => void;