Coverage for src/lexigram/features/cli/commands.py: 0%
20 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-26 01:53 +0800
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-26 01:53 +0800
1"""Features CLI command group factory."""
3from __future__ import annotations
5import typer
8def create_features_app() -> typer.Typer:
9 """Create the `lexigram features` command group.
11 Returns:
12 A Typer app containing feature flag management subcommands.
13 """
14 app = typer.Typer(help="Feature flag management commands")
16 @app.command("list")
17 def list_flags(
18 enabled_only: bool = typer.Option(
19 False, "--enabled-only", help="Show only enabled flags"
20 ),
21 ) -> None:
22 """List all feature flags."""
23 typer.echo("Feature flag listing not yet implemented")
25 @app.command("get")
26 def get_flag(
27 flag_name: str = typer.Argument(..., help="Feature flag name"),
28 ) -> None:
29 """Get details for a specific feature flag."""
30 typer.echo(f"Feature flag {flag_name!r} not yet implemented")
32 @app.command("enable")
33 def enable_flag(
34 flag_name: str = typer.Argument(..., help="Feature flag name"),
35 ) -> None:
36 """Enable a feature flag."""
37 typer.echo(f"Enabling flag {flag_name!r} not yet implemented")
39 @app.command("disable")
40 def disable_flag(
41 flag_name: str = typer.Argument(..., help="Feature flag name"),
42 ) -> None:
43 """Disable a feature flag."""
44 typer.echo(f"Disabling flag {flag_name!r} not yet implemented")
46 @app.command("evaluate")
47 def evaluate_flag(
48 flag_name: str = typer.Argument(..., help="Feature flag name"),
49 context_json: str | None = typer.Option(
50 None, "--context-json", help="Evaluation context as JSON"
51 ),
52 ) -> None:
53 """Evaluate a feature flag for a given context."""
54 typer.echo(f"Evaluating flag {flag_name!r} not yet implemented")
56 return app