Coverage for src \ truenex_memory \ diagnostics \ __main__.py: 0%

12 statements  

« prev     ^ index     » next       coverage.py v7.14.0, created at 2026-05-19 10:21 +0200

1"""Command-line entry point for local diagnostics.""" 

2 

3from __future__ import annotations 

4 

5import json 

6from pathlib import Path 

7from typing import Annotated 

8 

9import typer 

10 

11from truenex_memory.diagnostics import run_diagnostics 

12 

13app = typer.Typer(help="Run local Truenex Memory diagnostics.") 

14 

15 

16@app.command() 

17def run( 

18 base_path: Annotated[ 

19 Path | None, 

20 typer.Option("--base-path", help="Local path to validate for filesystem access."), 

21 ] = None, 

22) -> None: 

23 """Print diagnostics as JSON.""" 

24 

25 typer.echo(json.dumps(run_diagnostics(base_path), indent=2, sort_keys=True)) 

26 

27 

28if __name__ == "__main__": 

29 app()