Unfortunately deno developers won't distribute code from deno/cli as a library.
So this is stripped-down code temporary (I hope) taken from https://github.com/denoland/deno/tree/main/cli to make better compatibility.
Periodically it will synced with original repository.