Providers

A provider is a registry adapter that tells upgrade() (and the UpgradeCommand) which versions exist and where to download them. upgrade() takes a single provider. The UpgradeCommand also accepts an array: the first one is the default, the others are selectable with --registry.

Available providers

ProviderSourceScriptBinary
JsrProviderjsr packageyesno
NpmProvidernpm packageyesno
DenoLandProviderdeno.land/xyesno
NestLandProvidernest.landyesno
GithubProvidergithub repositoryyesyes
GitlabProvidergitlab repositoryyesyes
UrlProviderany urlDeno onlyyes

Providers group by where the cli is distributed:

The GithubProvider, GitlabProvider and UrlProvider can upgrade standalone executables by downloading a release asset. The shared configuration for that is described under binary upgrade.

Package name

The package name defaults to the cli name for the jsr, npm, deno.land and nest.land providers. Override it with the name option, or set the full package name on the jsr and npm providers.

The github and gitlab providers locate the source with the repository option instead, and url builds the url itself. The cli name is still what the upgraded cli is installed as, and what the binary inside a release archive is expected to be called. See binary upgrade to override the latter.

i

NOTE

@cliffy/command/upgrade re-exports the jsr, npm, deno.land, nest.land and github providers, but those re-exports are deprecated and will be removed in 2.0. Import providers from @cliffy/upgrade/provider/* instead. The gitlab and url providers are only available there.