src/cli/util.js/createContext
function createContext(args) {
  /** @type {Context} */
  const context = { args, stack: [] };

  updateContextArgv(context);
  normalizeContextArgv(context, ["loglevel", "plugin", "plugin-search-dir"]);

  context.logger = createLogger(context.argv.loglevel);

  updateContextArgv(
    context,
    context.argv.plugin,
    context.argv["plugin-search-dir"]
  );

  return context;
}