# Update command (/docs/v0.1/cli/update)



```bash
koshi update
```

The command checks GitHub Releases. When a newer version exists, it downloads
the archive for the current OS and architecture, extracts `koshi`, and replaces
the running executable.

If the current version is latest, it prints that result and exits successfully.
Network, platform, archive, permission, and install failures return an update
error.

On Unix, replacement uses an atomic rename. A root-owned install may ask for
`sudo` to run `install -m 755`. On Windows, the running executable moves aside
and the new one takes its path; the old image is removed on the next launch.

## Startup checks [#startup-checks]

Interactive launches can check on an interval and ask before installing:

```kdl title="koshi.kdl"
version 1

update {
    auto-check #true
    check-interval-days 14
    allow-prerelease #false
}
```

Startup check failures never block or crash a normal launch. koshi stores only
the last-check time in its own state file; it never rewrites `koshi.kdl`.

`allow-prerelease #true` chooses the highest semantic version from recent
releases, including pre-releases. Otherwise koshi uses GitHub's latest stable
release.
