Gathering detailed insights and metrics for @oclif/plugin-warn-if-update-available
Gathering detailed insights and metrics for @oclif/plugin-warn-if-update-available
Gathering detailed insights and metrics for @oclif/plugin-warn-if-update-available
Gathering detailed insights and metrics for @oclif/plugin-warn-if-update-available
warn user if a new CLI version is available
npm install @oclif/plugin-warn-if-update-available
Typescript
Module System
Min. Node Version
Node Version
NPM Version
TypeScript (93.22%)
JavaScript (6%)
Batchfile (0.78%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
38 Stars
949 Commits
14 Forks
2 Watchers
15 Branches
18 Contributors
Updated on Jul 14, 2025
Latest Version
3.1.44
Package Id
@oclif/plugin-warn-if-update-available@3.1.44
Unpacked Size
16.61 kB
Size
5.91 kB
File Count
10
NPM Version
10.9.2
Node Version
22.17.0
Published on
Jul 13, 2025
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
warns if there is a newer version of CLI released
This plugin shows a warning message if a user is running an out of date CLI.
This checks the version against the npm registry asynchronously in a forked process once every 60 days by default (see Configuration for how to configure this). It then saves a version file to the cache directory that will enable the warning. The upside of this method is that it won't block a user while they're using your CLI—the downside is that it will only display after running a command that fetches the new version.
Add the plugin to your project with yarn add @oclif/plugin-warn-if-update-available
, then add it to the package.json
of the oclif CLI:
1{ 2 "name": "mycli", 3 "version": "0.0.0", 4 // ... 5 "oclif": { 6 "plugins": ["@oclif/plugin-help", "@oclif/plugin-warn-if-update-available"] 7 } 8}
In package.json
, set oclif['warn-if-update-available']
to an object with
any of the following configuration properties:
timeoutInDays
- Duration between update checks. Defaults to 60.message
- Customize update message.registry
- URL of registry. Defaults to following your .npmrc configurationauthorization
- Authorization header value for registries that require auth. Defaults to following your .npmrc configurationfrequency
- The frequency that the new version warning should be shown.frequencyUnit
- The unit of time that should be used to calculate the frequency (days
, hours
, minutes
, seconds
, milliseconds
). Defaults to minutes
.1{ 2 "oclif": { 3 "plugins": ["@oclif/plugin-warn-if-update-available"], 4 "warn-if-update-available": { 5 "timeoutInDays": 7, 6 "message": "<%= config.name %> update available from <%= chalk.greenBright(config.version) %> to <%= chalk.greenBright(latest) %>.", 7 "registry": "https://my.example.com/module/registry", 8 "authorization": "Basic <SOME READ ONLY AUTH TOKEN>" 9 } 10 } 11}
Once a new version has been found, the default behavior is to notify the user on every command execution. You can modify this by setting the frequency
and frequencyUnit
options.
Examples
Once every 10 minutes.
1{ 2 "oclif": { 3 "warn-if-update-available": { 4 "frequency": 10 5 } 6 } 7}
Once every 6 hours.
1{ 2 "oclif": { 3 "warn-if-update-available": { 4 "frequency": 6, 5 "frequencyUnit": "hours" 6 } 7 } 8}
Once a day.
1{ 2 "oclif": { 3 "warn-if-update-available": { 4 "frequency": 1, 5 "frequencyUnit": "days" 6 } 7 } 8}
Once every 30 seconds.
1{ 2 "oclif": { 3 "warn-if-update-available": { 4 "frequency": 30, 5 "frequencyUnit": "seconds" 6 } 7 } 8}
<CLI>_SKIP_NEW_VERSION_CHECK
: Skip this version check<CLI>_FORCE_VERSION_CACHE_UPDATE
: Force the version cache to update<CLI>_NEW_VERSION_CHECK_FREQ
: environment variable override for frequency
setting<CLI>_NEW_VERSION_CHECK_FREQ_UNIT
: environment variable override for frequencyUnit
setting<CLI>_NEW_VERSION_CHECK_TAG
: distribution tag to check against (defaults to latest
)No vulnerabilities found.
Reason
30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 0/3 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More