I believe that we’re working on a similar product that you described. Our metrics layer, metriql, extends dbt for metrics definitions and provides an open-source CLI that serves your metrics to the data tools.
We have REST API and use Trino protocol so in case you support Trino (formerly Presto) you already support metriql. :)
Here is the link: https://metriql.com