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

37 statements  

« prev     ^ index     » next       coverage.py v7.15.2, created at 2026-11-06 08:17 +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 analyze, 

15 dataset, 

16 ingest_sync, 

17 memory, 

18 meta, 

19 profile, 

20 search_chat, 

21 servers, 

22 settings, 

23 wiki, 

24) 

25from lilbee.cli.commands import setup as setup_module 

26from lilbee.cli.launchers import launch_app 

27 

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

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

30app.command()(search_chat.search) 

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

32app.command()(ingest_sync.rebuild) 

33app.command()(ingest_sync.index) 

34app.command()(ingest_sync.add) 

35app.command()(ingest_sync.chunks) 

36app.command()(ingest_sync.remove) 

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

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

39app.command()(search_chat.ask) 

40app.command()(search_chat.chat) 

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

42app.command()(meta.version) 

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

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

45app.command()(meta.status) 

46app.command()(meta.reset) 

47app.command()(meta.init) 

48app.command(name="analyze")(analyze.analyze_cmd) 

49app.command()(servers.serve) 

50app.command()(setup_module.token) 

51app.command()(search_chat.topics) 

52app.command()(setup_module.login) 

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

54 

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

56# in `--help`. 

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

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

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

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

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

62app.add_typer(profile.profile_app, name="profile") 

63app.add_typer(settings.settings_app, name="settings") 

64 

65__all__ = ["app"]