knative / knative/client

Auto notify user how to get new version of kn CLI when using old version

Open
#1,327 2 comments 0 reactions 1 assignee Claimed by @gouthamhusky View on GitHub
kind/feature triage/accepted
Dominant language
Go
Stars
387
Forks
274
Avg merge
1d 6h
Merged PRs (30d)
8

Description

### Feature request

The CLI to print a notification if a user is using the older version and is recommended to get the new version.

### Use case

As kn CLI user I would like to get informed that I'm using an older version of the CLI and that a new one is available, and what command to I could use to quickly update based on the OS and method installation I used.

### UI Example

I know there are different ways to implement provide a good UX.

And a few considerations and questions:
- Feature on by default?
- Can a user turn it off via env variable?
- How often to do remote call to check for a new version?
- How to handle operating system (yum, Linux, Windows, MacOS) and method (ie installshield, brew, etc) installation

I opening this issue because I just got notified for a CLI I use Github CLI `gh` which I installed via homebrew and I liked the experience.
![image](https://user-images.githubusercontent.com/1094878/119353753-492dd980-bc71-11eb-866b-e7038d0ad51c.png)

Things I like about the UX:
1. I got notified the is a new version
2. Gave me the command to copy paste
3. Color-coded (ie blue for version, yellow for link)
4. Told me what version I have and what's the new version

As MVP and to get user feedback just implementing homebrew.
Not sure if this is something that homebrew does automatically or something we need to provide in the metadata.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.