const { parseArgs } = require("node:util") global.commandlineController = { getArguments: async () => { const parsed = parseArgs({ options: { shifter: { type: "string", short: "s", }, action: { type: "string", short: "a", }, amount: { type: "string", short: "m", }, note: { type: "string", short: "n", }, address: { type: "string", short: "d", } }, }); return parsed.values; }, execute: async () => { const args = await commandlineController.getArguments(); await serviceController[args.action](args); process.exit(); } }