Coverage for src/lilbee/cli/commands/__init__.py: 100%

34 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-08-14 11:46 +0000

1"""CLI command subpackage. 

2 

3Top-level Typer commands are split across submodules by domain. This 

4``__init__`` registers each command function on the shared ``app``. 

5Top-level commands are listed first so ``lilbee --help`` shows them 

6above the ``setup`` and ``wiki`` sub-typers (attached at the bottom). 

7""" 

8 

9from __future__ import annotations 

10 

11from lilbee.cli.app import app 

12from lilbee.cli.commands import ( 

13 agent_config, 

14 dataset, 

15 ingest_sync, 

16 memory, 

17 meta, 

18 search_chat, 

19 servers, 

20 wiki, 

21) 

22from lilbee.cli.commands import setup as setup_module 

23from lilbee.cli.launchers import launch_app 

24 

25# Top-level commands listed first so `lilbee --help` shows them before the 

26# `setup` and `wiki` sub-typers, which read better grouped at the bottom. 

27app.command()(search_chat.search) 

28app.command(name="sync")(ingest_sync.sync_cmd) 

29app.command()(ingest_sync.rebuild) 

30app.command()(ingest_sync.index) 

31app.command()(ingest_sync.add) 

32app.command()(ingest_sync.chunks) 

33app.command()(ingest_sync.remove) 

34app.command(name="export")(dataset.export_cmd) 

35app.command(name="import")(dataset.import_cmd) 

36app.command()(search_chat.ask) 

37app.command()(search_chat.chat) 

38app.command(name="use-embedder")(search_chat.use_embedder) 

39app.command()(meta.version) 

40app.command(name="self-check")(setup_module.self_check_cmd) 

41app.command(name="self-check-extras")(setup_module.self_check_extras_cmd) 

42app.command()(meta.status) 

43app.command()(meta.reset) 

44app.command()(meta.init) 

45app.command()(servers.serve) 

46app.command()(setup_module.token) 

47app.command()(search_chat.topics) 

48app.command()(setup_module.login) 

49app.command(name="mcp")(servers.mcp_cmd) 

50 

51# Sub-typers come last so `setup` and `wiki` follow the top-level commands 

52# in `--help`. 

53app.add_typer(setup_module.setup_app, name="setup") 

54app.add_typer(wiki.wiki_app, name="wiki") 

55app.add_typer(agent_config.agent_config_app, name="agent-config") 

56app.add_typer(launch_app, name="launch") 

57app.add_typer(memory.memory_app, name="memory") 

58 

59__all__ = ["app"]