UI — client CLI¶
Shared Typer client CLI factory for Klea packages.
File: klea_utils/ui/cli.py
Copyright 2026 Ankur Sinha Author: Ankur Sinha <sanjay DOT ankur AT gmail DOT com>
- klea_utils.ui.cli.make_client_app(*, label: str, server_url_default: str, app_module: str, tui_app_name: str, web_app_name: str) Typer[source]¶
Create a Typer app for a Klea user client (cli + web).
The app exposes
cli/websubcommands for the terminal and NiceGUI clients respectively, each carrying its own options so--helpon a subcommand lists everything it accepts. Invoked with no subcommand the app prints its usage help. All package-specific values are passed as parameters, so the rag and code entry points stay thin wrappers.- Parameters:
label – Short package name used in help text (e.g.
"RAG")server_url_default – Default server URL (e.g.
"http://127.0.0.1:8005")app_module – Uvicorn module string for the server this client talks to (e.g.
"klea_rag.api.main:app")tui_app_name – Log identity for the terminal client (e.g.
"klea-rag-tui")web_app_name – Log identity for the web client (e.g.
"klea-rag-web")
- Returns:
A
typer.Typerapp for use as a CLI entry point