'use strict';

const cli = require('./shared/cli.70f88f92.cjs');
const index = require('./shared/cli.3e065eec.cjs');
require('./shared/cli.cebce5ac.cjs');
require('tty');
require('./shared/cli.81cce562.cjs');
require('./shared/cli.de27c2e0.cjs');
require('events');
require('fs');
require('path');
require('util');
require('stream');
require('os');
require('node:fs');
require('node:module');
require('node:url');
require('node:fs/promises');
require('node:os');
require('crypto');
require('module');
require('perf_hooks');
require('vm');
require('url');
require('assert');
require('buffer');
require('node:path');
require('constants');
require('net');
require('child_process');
require('./shared/cli.80b03f33.cjs');
require('./shared/cli.5842d489.cjs');

async function runCommand(command, argv = process.argv.slice(2)) {
  const args = cli.mri(argv);
  args.clear = false;
  const cmd = await index.commands[command]();
  if (!cmd) {
    throw new Error(`Invalid command ${command}`);
  }
  await cmd.invoke(args);
}

exports.main = cli.main;
exports.runCommand = runCommand;
