How to extract DBT metadata shown through list commands to a file for further data analysis

The problem I’m having:

I am trying to export the dbt metadata shown through ls command to file(csv / json).

The context of why I’m trying to do this:

This files can be used to create reporting metrics on dbt models(when and what models ran)

What I’ve already tried :

Using custom dbt packages to write customized metadata to table using macros in a model.