Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add something to get recently added formulaes #19191

Open
1 task done
ccoVeille opened this issue Feb 1, 2025 · 5 comments
Open
1 task done

feat: add something to get recently added formulaes #19191

ccoVeille opened this issue Feb 1, 2025 · 5 comments
Labels
features New features

Comments

@ccoVeille
Copy link

ccoVeille commented Feb 1, 2025

Verification

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.

Image

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.

@ccoVeille ccoVeille added the features New features label Feb 1, 2025
@MikeMcQuaid
Copy link
Member

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?

@ccoVeille
Copy link
Author

ccoVeille commented Feb 1, 2025

I'm more interested in being able to see something like this via a command

Image

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

@gromgit
Copy link
Member

gromgit commented Feb 1, 2025

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.

@ccoVeille
Copy link
Author

ccoVeille commented Feb 1, 2025

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 outdated exists, and is great

it will produce something like this

Image

  • brew update exists and will upgrade brew if needed

when brew is up-to-date, it will report something like this

Image

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

Image

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

unless Homebrew::EnvConfig.no_update_report_new?
dump_new_formula_report
dump_new_cask_report
end

@apainintheneck
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
features New features
Projects
None yet
Development

No branches or pull requests

4 participants