European Parliament MCP Server API - v1.2.6
    Preparing search index...

    Function parseCLIArgs

    • Parse an array of CLI argument strings into a typed CLIOptions object.

      Supports the canonical flags --help / -h, --version / -v, --health, and the --timeout <ms> value flag.

      Parameters

      • argv: string[]

        Array of raw argument strings (typically process.argv.slice(2))

      Returns CLIOptions

      Typed CLI options with boolean flags and optional timeout

      const opts = parseCLIArgs(['--health']);
      if (opts.health) showHealth();
      const opts = parseCLIArgs(['--timeout', '90000']);
      // opts.timeout === 90000