diff --git a/src/databricks/labs/blueprint/cli.py b/src/databricks/labs/blueprint/cli.py index 19c2eca..d383d86 100644 --- a/src/databricks/labs/blueprint/cli.py +++ b/src/databricks/labs/blueprint/cli.py @@ -4,6 +4,7 @@ import inspect import json import logging +import os import types from collections.abc import Callable from dataclasses import dataclass @@ -85,6 +86,9 @@ def _route(self, raw): # user agent is set consistently with the Databricks CLI: # see https://github.com/databricks/cli/blob/main/cmd/root/user_agent_command.go#L35-L37 with_user_agent_extra("cmd", command) + cli_version = os.environ.get("DATABRICKS_CLI_VERSION") + if cli_version: + with_user_agent_extra("cli", cli_version) flags = payload["flags"] log_level = flags.pop("log_level") if log_level == "disabled":