Files
ThothII/harness/tht/cli/__init__.py
T
marcopan 40b3bac6c6 feat(harness): port vector_cmd (Onda 2) — helper vector condivisi
Esporta make_embedder/open_store/open_searcher/require_vector_cfg usati da
memory/search/evidence cmd (Onda 3). 3 residui nsp nei messaggi fixati (grep-per-file).
2026-06-27 14:08:54 +02:00

50 lines
1.4 KiB
Python

"""tht CLI -- Typer app `tht`.
Minimal skeleton for now: registers `phase_app` (the gate needs `tht phase meta --json`).
Other command groups (db, schema, lsh, vector, memory, session, decision, sql, cte,
evidence, search) are wired in their porting tasks, once their backend deps land
(A9 ports db/mschema/_guards; B1 ports vectorstore; B3 ports search/lshindex/sampling).
"""
from __future__ import annotations
import typer
from tht import __version__
app = typer.Typer(
help="tht (Thoth) -- kit operativo per generazione SQL assistito da Pi",
no_args_is_help=True,
)
def _version_callback(value: bool) -> None:
if value:
typer.echo(__version__)
raise typer.Exit()
@app.callback()
def main(
version: bool = typer.Option(
False,
"--version",
callback=_version_callback,
is_eager=True,
help="Mostra la versione ed esce.",
),
) -> None:
pass
from tht.cli.config_cmd import config_app # noqa: E402
from tht.cli.phase_cmd import phase_app # noqa: E402
from tht.cli.schema_cmd import schema_app # noqa: E402
from tht.cli.session_cmd import session_app # noqa: E402
from tht.cli.vector_cmd import vector_app # noqa: E402
app.add_typer(phase_app, name="phase")
app.add_typer(config_app, name="config")
app.add_typer(schema_app, name="schema")
app.add_typer(session_app, name="session")
app.add_typer(vector_app, name="vector")