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

26 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-05-15 20:55 +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 ingest_sync, meta, search_chat, servers, wiki 

13from lilbee.cli.commands import setup as setup_module 

14 

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

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

17app.command()(search_chat.search) 

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

19app.command()(ingest_sync.rebuild) 

20app.command()(ingest_sync.add) 

21app.command()(ingest_sync.chunks) 

22app.command()(ingest_sync.remove) 

23app.command()(search_chat.ask) 

24app.command()(search_chat.chat) 

25app.command()(meta.version) 

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

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

28app.command()(meta.status) 

29app.command()(meta.reset) 

30app.command()(meta.init) 

31app.command()(servers.serve) 

32app.command()(setup_module.token) 

33app.command()(search_chat.topics) 

34app.command()(setup_module.login) 

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

36 

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

38# in `--help`. 

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

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

41 

42__all__ = ["app"]