corvix.cli¶
Command line interface for Corvix.
Attributes¶
Functions¶
|
|
|
|
|
|
|
|
|
Corvix local GitHub notifications dashboard. |
|
Write a starter YAML config. |
|
Run one poll cycle and persist processed notifications to cache. |
|
Run periodic poll cycles, suitable for cron-like local daemon behavior. |
|
Render dashboards from the persisted cache file without polling GitHub. |
|
Run Litestar dashboard website. |
|
Import legacy JSON cache records into PostgreSQL. |
|
Exit 0 when the poller status in PostgreSQL is fresh, else fail. |
|
Build the configured storage backend, surfacing config errors to the CLI. |
|
|
|
|
|
|
|
Module Contents¶
- corvix.cli._apply_actions_callback(ctx: click.Context, param: click.Parameter, value: bool) bool[source][source]¶
- corvix.cli.main(ctx: click.Context, config_path: pathlib.Path) None[source][source]¶
Corvix local GitHub notifications dashboard.
- corvix.cli.init_config_command(path: pathlib.Path, force: bool) None[source][source]¶
Write a starter YAML config.
- corvix.cli.poll_command(ctx: click.Context, apply_actions: bool) None[source][source]¶
Run one poll cycle and persist processed notifications to cache.
- corvix.cli.watch_command(ctx: click.Context, apply_actions: bool, iterations: int | None) None[source][source]¶
Run periodic poll cycles, suitable for cron-like local daemon behavior.
- corvix.cli.dashboard_command(ctx: click.Context, dashboard_name: str | None) None[source][source]¶
Render dashboards from the persisted cache file without polling GitHub.
- corvix.cli.serve_command(ctx: click.Context, host: str, port: int, reload: bool) None[source][source]¶
Run Litestar dashboard website.
- corvix.cli.migrate_cache_command(ctx: click.Context) None[source][source]¶
Import legacy JSON cache records into PostgreSQL.
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). This is a one-shot upgrade helper for installs that still have a
notifications.jsonfile from older versions.
- corvix.cli.poller_health_command(ctx: click.Context) None[source][source]¶
Exit 0 when the poller status in PostgreSQL is fresh, else fail.
Intended for container healthchecks: it reads the poller status the watch loop writes to PostgreSQL and verifies a successful poll happened recently.
- corvix.cli._build_storage(app_config: corvix.config.AppConfig) corvix.storage.StorageBackend[source][source]¶
Build the configured storage backend, surfacing config errors to the CLI.
- corvix.cli._load_app_config(config_path: pathlib.Path) corvix.config.AppConfig[source][source]¶
- corvix.cli._build_clients(accounts: list[corvix.config.GitHubAccountConfig], polling: corvix.config.PollingConfig) tuple[corvix.services.NotificationsClient, Ellipsis][source][source]¶