MoonshotAI / MoonshotAI/kimi-code
install.ps1: powershell script might download release version faster by few lines changes in windows installation script
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 7.5k
- Forks
- 1.2k
- Avg merge
- 11h 53m
- Merged PRs (30d)
- 350
Description
Hi, this is ancient bug of powershell itself, related to: https://github.com/PowerShell/PowerShell/issues/2138
tl;dr: very slow downloading when used Invoke-WebRequest in powershell. That why its so slow to download binary from github.
Report & Suggestion about:
try {
$binaryUrl = "$KimiBinaryBase/$version/$filename"
$tmpBinary = Join-Path $tmp $filename
Write-Step "Downloading $binaryUrl"
Invoke-WebRequest -Uri $binaryUrl -OutFile $tmpBinary
Write-Step "Verifying checksum"
Test-Sha256 $tmpBinary $checksum
Windows 11, latest build.
Replace with: Start-BitsTransfer -Source
And this will help a lot to speedup downloading cli on windows.
Internet speed not issue here, i already reported earlier (not to Kimi) but to another big software about the issue and its fixed by simple changes in script.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the Windows installation path in install.ps1, starting at the Invoke-WebRequest call that downloads the binary. Check how the suggested Start-BitsTransfer replacement interacts with the existing temporary file and checksum verification. Done means the Windows installer downloads the release binary through the faster path while preserving checksum verification.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 72/100