Summary
KDM should automatically check whether a newer version of the CLI is available and notify users when they are running an outdated version.
This feature will help users stay updated with the latest improvements, bug fixes, security patches, and newly introduced features without manually checking npm releases.
Problem
Currently, users have no visibility into whether:
- A newer version of KDM is available
- Their installed version is outdated
- Important fixes or breaking changes exist in newer releases
As a result:
- Users may continue using deprecated or buggy versions
- Support/debugging becomes harder due to version mismatches
- New features remain undiscovered
- Critical fixes may not reach users quickly
Proposed Solution
Implement automatic version checking whenever the CLI starts or when a command is executed.
The CLI should:
- Detect the currently installed version
- Compare it with the latest published npm version
- Notify the user if an update is available
- Provide a direct update command
Example Behavior
User Running Older Version
Output:
A newer version of KDM is available!
Current Version : v2.1.2
Latest Version : v2.2.0
Update using:
npm install -g kdm-cli@latest
Suggested Features
Silent Background Version Check
- Perform lightweight version checks asynchronously
- Avoid slowing down command execution
- Cache results temporarily to reduce unnecessary API calls
Smart Notification System
- Show update prompts only once per session/day
- Avoid spamming users on every command
- Highlight major or breaking updates separately
Semantic Version Awareness
Different messages for:
- Patch updates (
2.1.2 → 2.1.3)
- Minor updates (
2.1.2 → 2.2.0)
- Major updates (
2.x → 3.x)
Optional Flags
Examples:
kdm --version
kdm update check
kdm update
Additional Enhancements
- Add release notes link in update prompt
- Add auto-update support in future
- Allow users to disable update notifications
- Add update status inside
kdm doctor
- Show changelog summary for major releases
Benefits
- Keeps users on supported versions
- Improves overall CLI reliability
- Reduces issue reports caused by outdated builds
- Faster adoption of new features
- Better developer and user experience
- More professional CLI ecosystem
Suggested Implementation
Possible approaches:
- Use npm registry version checks
- Compare
package.json version with latest npm release
- Use lightweight update notifier libraries
- Cache checks locally for performance optimization
Expected Outcome
Users should automatically receive a clean and non-intrusive notification whenever a newer KDM version is available, along with a direct command to upgrade easily.
Summary
KDM should automatically check whether a newer version of the CLI is available and notify users when they are running an outdated version.
This feature will help users stay updated with the latest improvements, bug fixes, security patches, and newly introduced features without manually checking npm releases.
Problem
Currently, users have no visibility into whether:
As a result:
Proposed Solution
Implement automatic version checking whenever the CLI starts or when a command is executed.
The CLI should:
Example Behavior
User Running Older Version
Output:
Suggested Features
Silent Background Version Check
Smart Notification System
Semantic Version Awareness
Different messages for:
2.1.2 → 2.1.3)2.1.2 → 2.2.0)2.x → 3.x)Optional Flags
Examples:
Additional Enhancements
kdm doctorBenefits
Suggested Implementation
Possible approaches:
package.jsonversion with latest npm releaseExpected Outcome
Users should automatically receive a clean and non-intrusive notification whenever a newer KDM version is available, along with a direct command to upgrade easily.