feat: add something to get recently added formulaes
Verification
- [x] This issue's title and/or description do not reference a single formula e.g.
brew install wget. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
Provide a detailed description of the proposed feature
I would like to get something that could bring me information about recently added formula and casks in the same way they are reported when brew itself gets upgraded.
What is the motivation for the feature?
Right now, when brew is upgraded either manually or via the env variable that controls the auto upgrade of brew, there is a list of recently added formulaes that are displayed in the terminal
These are displayed when brew starts to get upgraded, or when you install something an the delay to upgrade brew is passed.
Thes valuables information are lost in the terminal history, and they are displayed once and never again.
How will the feature be relevant to at least 90% of Homebrew users?
I think some users are as curious as me, and don't want to use an RSS aggregator.
We are living on terminal and barely gets outside you know that.
My main issue is that I want to know what new programs are available, so I could use brew info to see if they are revelant.
What alternatives to the feature have been considered?
I tried to find a command to find them back but I find nothing. brew search (with a catchall search), but it cannot be limited in time or sorted.
I looked at each available command I think, abd then looked at each parameter they support. Please bare with me, if I missed something.
The only thing I found was to watch the GitHub repositories, but the noise is important.
An RSS aggregator can also be used to follow GitHub changes, but here there are also noise.
Parsing the brew public API is also possible, but quite a pain (maybe you have an RSS feed, but anyway RSS is not a solution I would expect to be suggested)
The code already reported the new formula and cask on some conditions, I would like to be able to get the list of new formula and casks with a dedicated command.
I tried to find a command to find them back but I find nothing.
brew search(with a catchall search), but it cannot be limited in time or sorted.
Something like brew log wget but for all packages: is that what you're looking for?
I'm more interested in being able to see something like this via a command
So what was recently added to homebrew
But maybe it's what you call a brew log for all packages, which could be interesting.
But my need is about being able to list/see the recently added formula/cask in a similar way they are reported when brew gets upgraded
I'm more interested in being able to see something like this via a command
That's the output of brew update, so what you want already exists.
That's the output of brew update, so what you want already exists.
I'm sorry if I wasn't able to easily describe my need.
So let me try to rephrase
brew outdatedexists, and is great
it will produce something like this
brew updateexists and will upgrade brew if needed
when brew is up-to-date, it will report something like this
On next call to brew update you will nothing reported, so then you have to call brew outdated to see the list of package that could be upgraded.
OK so nothing exciting here. But at least, I hope we have the same understanding.
Now, let's assume there are new formulae available, and brew gets updated manually with either:
- brew update
- brew upgrade foo (and you have autoupdate enabled for brew)
- brew install bar (and you have autoupdate enabled for brew)
You will also see the following message
You will see a list of new formulae available
My problem is that this list is printed only once. If you close the terminal you cannot get it back
git log might be used, but it's a pain to find the new formulae/cast is a way as convenient as the list that the list that is printed only once.
You may tell me I could disable brew autoupdate and then use brew update when I want to see the list, then cherish the terminal output, but then I'm sarcastic and it's not the solution I'm looking for.
What I would like is to be able to get something equivalent to this, even if brew is already updated
https://github.com/Homebrew/brew/blob/9465364acc829fee1994c6d0434afbe9d2e07072/Library/Homebrew/cmd/update-report.rb#L764-L767
What does recent mean in this context? Is it the last 50 formulae? Is it the formulae added in the last week?
I don't think a list exists anywhere with newly added formulae. The tricky thing is that the creation date of a formulae is not stored in the associated metadata. The only way I can think of to find that out is by looking at the date the file was created in the associated tap which is basically just a Git repo with formula definition files so it will end up working similar to @MikeMcQuaid's suggestion of brew log wget. That approach would only work for local taps though. Anything from the JSON API doesn't have the necessary creation date info.
Thanks for your detailed reply. I'm sorry for the delay in mine.
What does recent mean in this context? Is it the last 50 formulae? Is it the formulae added in the last week?
Here it's a good question, but then I would say it's a matter of implantation. Some may ask "since last time I checked", others with "in the last X days", "only the last X ones"
Here we are already looking at the possible flags and features that would need to be implemented if it was possible to implement it.
But your next sentences seem to confirm it's uneasy, if not impossible
I don't think a list exists anywhere with newly added formulae. The tricky thing is that the creation date of a formulae is not stored in the associated metadata. The only way I can think of to find that out is by looking at the date the file was created in the associated tap which is basically just a Git repo with formula definition files so it will end up working similar to @MikeMcQuaid's suggestion of brew log wget. That approach would only work for local taps though. Anything from the JSON API doesn't have the necessary creation date info.
So except having something that locally store the what was reported new and when, so a local database, ot won't be possible.
Right now the code is reporting somehow to users, "oh guys, I updated, and I found these I have never heard of", and then once updated it's too late because the things are in the database.
So you somehow confirm me that right now, the newly added packages are displayed once, and that's it.
Solutions might exist, but they are not obvious, and might be limited.
I'm a bit sad about this. But at least I asked, and you guys helped me to figure it won't be easy.
Thanks
So you somehow confirm me that right now, the newly added packages are displayed once, and that's it.
Would it be helpful if the output message was cached and you could see the last one/few with brew changed or something?
If it's literally just "I missed the brew update message and want to see it again": that seems doable.
I would be happy if such a thing was possible, yes.
@ccoVeille How far back would it need to go? Would just the last update output be enough. If not: how much would be the minimum for this to be useful (or maximum you'd see yourself using)?
The last one could be enough in some cases, but having the last 3 would be enough I think.
The use case I'm thinking about is the fact you launch and update by error, just after an autouprade you didn't see.
So 3 would be enough I think.
The last update that brought at least one new thing would be better. It would avoid having nothing if you launch brew update by testing something.
Otherwise, another way to consider this is to store anything new with a delay of 2 weeks.
Anything better than what we have now would be great
@ccoVeille Ok, thanks. I feel like just storing the last 2-3 output brew update messages for a command to output later would make sense.
It would be also simpler to implement I think.
+1, though I would prefer if it was a switch and/or setting, such that I could specify how many or how far back I should generally or per instance want to go back.
Quick feedback here
Since the way the new formulae evolved to display information about it
$ brew update
(...)
==> New Formulae
badread: Long read simulator that can imitate many types of read problems
burrow: Kafka Consumer Lag Checking
decker: HyperCard-like multimedia sketchpad
execstack: Utility to set/clear/query executable stack bit
homeport/tap/go-cache-prog
kafkactl-aws-plugin: AWS Plugin for kafkactl
kafkactl-azure-plugin: Azure Plugin for kafkactl
lakekeeper: Apache Iceberg REST Catalog
min-lang: Small but practical concatenative programming language and shell
nixfmt: Command-line tool to format Nix language code
pgslice: Postgres partitioning as easy as pie
scdl: Command-line tool to download music from SoundCloud
somo: Human-friendly alternative to netstat for socket and port monitoring
stormy: Minimal, customizable and neofetch-like weather CLI based on rainy
My need to get the list of recent formulae decreased, because my need was to know what was new, and if it would be interesting for me to install them.
But, I still think there is a need to be able to get the list of recent formulaes, because you might miss homebrew was updated, and new formulaes were added.
Passing on this for now but may reconsider in future. We'll review a PR if you're interested in implementing this yourself.