corvix.cli ========== .. py:module:: corvix.cli .. autoapi-nested-parse:: Command line interface for Corvix. Functions --------- .. autoapisummary:: corvix.cli.main corvix.cli.init_config_command corvix.cli.poll_command corvix.cli.watch_command corvix.cli.dashboard_command corvix.cli.serve_command corvix.cli.migrate_cache_command corvix.cli._load_app_config corvix.cli._resolve_token corvix.cli._build_clients corvix.cli._config_path_from_context Module Contents --------------- .. py:function:: main(ctx: click.Context, config_path: pathlib.Path) -> None Corvix local GitHub notifications dashboard. .. py:function:: init_config_command(path: pathlib.Path, force: bool) -> None Write a starter YAML config. .. py:function:: poll_command(ctx: click.Context, apply_actions: bool) -> None Run one poll cycle and persist processed notifications to cache. .. py:function:: watch_command(ctx: click.Context, apply_actions: bool, iterations: int | None) -> None Run periodic poll cycles, suitable for cron-like local daemon behavior. .. py:function:: dashboard_command(ctx: click.Context, dashboard_name: str | None) -> None Render dashboards from the persisted cache file without polling GitHub. .. py:function:: serve_command(ctx: click.Context, host: str, port: int, reload: bool) -> None Run Litestar dashboard website. .. py:function:: migrate_cache_command(ctx: click.Context, user_id: str) -> None Import JSON cache records into PostgreSQL for a given user. Reads the cache file from the config, then upserts all records into the PostgreSQL database using the DATABASE_URL (or the env var named in config.database.url_env). .. py:function:: _load_app_config(config_path: pathlib.Path) -> corvix.config.AppConfig .. py:function:: _resolve_token(token_env: str) -> str .. py:function:: _build_clients(accounts: list[corvix.config.GitHubAccountConfig]) -> tuple[corvix.services.NotificationsClient, Ellipsis] .. py:function:: _config_path_from_context(ctx: click.Context) -> pathlib.Path