Skip to main content

Metriql CLI

Metriql CLI has two commands:

  • generate generates Aggregate dbt models inside your dbt project

  • serve creates an HTTP server that lets you connect your datasets from your data tools.


Please note that you need to install dbt to use metriql.

docker pull buremba/metriql:latest

And run the following command:

export DBT_PROFILES_DIR=${HOME}/.dbt
export METRIQL_PORT=5656
docker run -it -p "${METRIQL_PORT}:5656" -v "${DBT_PROJECT_DIR}:/root/app" -v "${DBT_PROFILES_DIR}:/root/.dbt" -e METRIQL_RUN_HOST= -e DBT_PROJECT_DIR=/root/app buremba/metriql \

P.S: If you're a developer who is looking to contribute Metriql, please refer to the documentation for running Metriql in your IDE.

Supported dbt deployments#

The CLI interacts with the dbt via Metadata API. You need to run dbt compile and generate the target/manifest.json file separately from Metriql and pass the URI of the manifest.json file as an option. Metriql uses DBT_MANIFEST_JSON environment variable and --manifest-json argument when accessing the manifest.json file URI. The following URI schemes are valid at the moment:


If you want to update the datasets without restarting Metriql, you can use Metriql's Update Manifest API endpoint to fetch the manifest.json from the source URL.


If you're running dbt and Metriql locally in the same environment, you can pass the manifest file location as file URI.



http and https#

If your dbt Docs is public or you expose manifest.json in a public way, you can pass the URL when starting Metriql.



If you're running dbt via dbt Cloud, you can access the manifest.json file via dbt Cloud API. You need to generate an API token on dbt Cloud and and pass the Job id to Metriql so that it can interact with the API to fetch the manifest.json artifact. Please note that you need to be on a paid plan to be able to use the API.