Files
stack/src/cli/db.py
kert 78faf0dd25 add CLI skeleton with typer: stack run/load/generate/bib/lake/db/validate/docs refs #2
Eight subcommand groups wired as stub commands:
  stack run <pipeline> [--target]
  stack load cclf|bcda|seed
  stack generate models
  stack bib sync|tag|query
  stack lake deploy|load
  stack db comment|inspect
  stack validate [pipeline]
  stack docs build|serve [--port]

All commands print [stub] — implementations come in later milestones.
Entry point: [project.scripts] stack = "cli:main" in pyproject.toml.
21 tests covering every subcommand.
2026-03-12 14:44:57 -04:00

22 lines
481 B
Python

"""stack db — DuckDB utilities."""
from __future__ import annotations
import typer
app = typer.Typer(no_args_is_help=True)
@app.command()
def comment() -> None:
"""Apply column comments from bib metadata to DuckDB."""
typer.echo("db comment [stub]")
@app.command()
def inspect(
table: str = typer.Argument("", help="Table name (schema.table)."),
) -> None:
"""Inspect DuckDB table schema and stats."""
typer.echo(f"db inspect: table={table!r} [stub]")