corvix.cli

Command line interface for Corvix.

Attributes

F

Functions

_parse_bool_value(→ bool)

_resolve_apply_actions_default(→ bool | None)

_apply_actions_callback(→ bool)

_apply_actions_option(→ collections.abc.Callable[[F], F])

main(→ None)

Corvix local GitHub notifications dashboard.

init_config_command(→ None)

Write a starter YAML config.

poll_command(→ None)

Run one poll cycle and persist processed notifications to cache.

watch_command(→ None)

Run periodic poll cycles, suitable for cron-like local daemon behavior.

dashboard_command(→ None)

Render dashboards from the persisted cache file without polling GitHub.

serve_command(→ None)

Run Litestar dashboard website.

migrate_cache_command(→ None)

Import legacy JSON cache records into PostgreSQL.

poller_health_command(→ None)

Exit 0 when the poller status in PostgreSQL is fresh, else fail.

_build_storage(→ corvix.storage.StorageBackend)

Build the configured storage backend, surfacing config errors to the CLI.

_load_app_config(→ corvix.config.AppConfig)

_resolve_token(→ str)

_build_clients(...)

_config_path_from_context(→ pathlib.Path)

Module Contents

corvix.cli.F[source][source]
corvix.cli._parse_bool_value(value: str) bool[source][source]
corvix.cli._resolve_apply_actions_default() bool | None[source][source]
corvix.cli._apply_actions_callback(ctx: click.Context, param: click.Parameter, value: bool) bool[source][source]
corvix.cli._apply_actions_option() collections.abc.Callable[[F], F][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.json file 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._resolve_token(token_env: str) str[source][source]
corvix.cli._build_clients(accounts: list[corvix.config.GitHubAccountConfig], polling: corvix.config.PollingConfig) tuple[corvix.services.NotificationsClient, Ellipsis][source][source]
corvix.cli._config_path_from_context(ctx: click.Context) pathlib.Path[source][source]