anchor.diff:  type ProcessOptions(?envVars, ?redirectOutput) =
       member val EnvVars = defaultArg envVars Map.empty<string,string>
       member val RedirectOuput = defaultArg redirectOutput false
  +
  +type Arguments =
  +    { timeout: int; port: int; commandArgs: string option }
   
   let startProcess workingDir fileName args (opts: ProcessOptions) =
       let fileName, args =
  
positive.code:     l.Stop()
      port
  
  let getPortAndTimeout argsMap =
      let port =
          match Map.tryFind "port" argsMap with
          | Some "free" -> getFreePort()
          | Some port -> int port
          | None -> Constants.DEFAULT_PORT
      let timeout =
          match Map.tryFind "timeout" argsMap with
          | Some timeout -> int timeout
          | None -> -1
      port, timeout
  
  let debug (projFile: string) (define: string[]) =
      let com = Compiler()
  
negative.code: let main argv =
      match Array.tryHead argv with
      | Some ("--help"|"-h") ->
          (Constants.VERSION, Constants.DEFAULT_PORT) ||> printfn """
  Fable, F# to JS compiler (%s)
  Usage: dotnet fable [command] [script] [fable arguments] [-- [script arguments]]
  
  Commands:
    -h|--help           Show help
    --version           Print version
    start               Start Fable server
    npm-run             Run Fable while an npm script is running
    node-run            Run Fable while a node script is running
    shell-run           Run Fable while a shell script is running
    webpack             Start Fable server, invoke Webpack and shut it down
    webpack-dev-server  Run Fable while Webpack development server is running
  
  Fable arguments:
    --timeout           Stop the server if timeout (ms) is reached
    --port              Port number (default %d) or "free" to choose a free port.
  
  To pass arguments to the script, write them after `--`.
  Example: `dotnet fable npm-run build --port free -- -p --config webpack.production.js`
  """
      | Some "--version" -> printfn "%s" Constants.VERSION
      | Some "start" ->
          let args = argv.[1..] |> parseArguments
          let agent = startAgent()
          startServer args.port args.timeout agent.Post Async.RunSynchronously
      | Some "npm-run" ->
          let args = argv.[2..] |> parseArguments
          let execArgs =
              match args.commandArgs with
              | Some npmArgs -> "run " + argv.[1] + " -- " + npmArgs
              | None -> "run " + argv.[1]
          startServerWithProcess args.port "npm" execArgs
      | Some "node-run" ->
          let args = argv.[2..] |> parseArguments
          let execArgs =
              match args.commandArgs with
              | Some scriptArgs -> argv.[1] + " " + scriptArgs
              | None -> argv.[1]
          startServerWithProcess args.port "node" execArgs
      | Some ("webpack" | "webpack-dev-server" as webpack) ->
          let args = argv.[1..] |> parseArguments
          let workingDir = Directory.GetCurrentDirectory()
          let webpackScript =
              let webpackScript =
                  Path.Combine(findPackageJsonDir workingDir, "node_modules", webpack, "bin", webpack + ".js")
                  |> sprintf "\"%s\""
              match args.commandArgs with
              | Some args -> webpackScript + " " + args
              | None -> webpackScript
          startServerWithProcess args.port "node" webpackScript
      | Some "shell-run" ->
          let cmd = argv.[1]
          let args = argv.[2..] |> parseArguments
          let execArgs = defaultArg args.commandArgs ""
          startServerWithProcess args.port cmd execArgs
      | Some "debug" ->
          debug argv.[1] argv.[2..]
      | Some "add" -> printfn "The add command has been deprecated. Use Paket to manage Fable libraries."
      | Some cmd -> printfn "Unrecognized command: %s. Use `dotnet fable --help` to see available options." cmd
      | None -> printfn "Command missing. Use `dotnet fable --help` to see available options."
      0
  