From 1499ce5549f77c8cfd5b7450ab97b414df81c75a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Mon, 2 Feb 2026 12:40:45 +0100 Subject: [PATCH] feat: print version during startup (#275) * feat: print version during startup * feat: print version during startup --- hindsight-api/hindsight_api/banner.py | 3 +++ hindsight-api/hindsight_api/main.py | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/hindsight-api/hindsight_api/banner.py b/hindsight-api/hindsight_api/banner.py index 00c935e3..252dda47 100644 --- a/hindsight-api/hindsight_api/banner.py +++ b/hindsight-api/hindsight_api/banner.py @@ -83,9 +83,12 @@ def print_startup_info( embeddings_provider: str, reranker_provider: str, mcp_enabled: bool = False, + version: str | None = None, ): """Print styled startup information.""" print(color_start("Starting Hindsight API...")) + if version: + print(f" {dim('Version:')} {color(f'v{version}', 0.1)}") print(f" {dim('URL:')} {color(f'http://{host}:{port}', 0.2)}") print(f" {dim('Database:')} {color(database_url, 0.4)}") print(f" {dim('LLM:')} {color(f'{llm_provider} / {llm_model}', 0.6)}") diff --git a/hindsight-api/hindsight_api/main.py b/hindsight-api/hindsight_api/main.py index d7802b84..2bc82806 100644 --- a/hindsight-api/hindsight_api/main.py +++ b/hindsight-api/hindsight_api/main.py @@ -20,7 +20,7 @@ import warnings import uvicorn -from . import MemoryEngine +from . import MemoryEngine, __version__ from .api import create_app from .banner import print_banner from .config import DEFAULT_WORKERS, ENV_WORKERS, HindsightConfig, get_config @@ -362,6 +362,7 @@ def main(): embeddings_provider=config.embeddings_provider, reranker_provider=config.reranker_provider, mcp_enabled=config.mcp_enabled, + version=__version__, ) # Start idle checker in daemon mode