gunn.cli package

Submodules

gunn.cli.config module

Configuration management CLI commands.

gunn.cli.config.config_validate_command(args)[ソース]

Validate configuration file or environment variables.

戻り値の型:

int

パラメータ:

args (list[str])

Args:

args: Command line arguments

Returns:

Exit code (0 for success, 1 for error)

gunn.cli.config.config_show_command(args)[ソース]

Show current configuration.

戻り値の型:

int

パラメータ:

args (list[str])

Args:

args: Command line arguments

Returns:

Exit code (0 for success, 1 for error)

gunn.cli.config.config_init_command(args)[ソース]

Initialize configuration file with defaults.

戻り値の型:

int

パラメータ:

args (list[str])

Args:

args: Command line arguments

Returns:

Exit code (0 for success, 1 for error)

gunn.cli.config.config_env_command(args)[ソース]

Show environment variable configuration.

戻り値の型:

int

パラメータ:

args (list[str])

Args:

args: Command line arguments

Returns:

Exit code (0 for success, 1 for error)

gunn.cli.config.run_config_command(args)[ソース]

Run configuration management commands.

戻り値の型:

int

パラメータ:

args (list[str])

Args:

args: Command line arguments

Returns:

Exit code (0 for success, 1 for error)

gunn.cli.config.print_config_help()[ソース]

Print configuration command help.

戻り値の型:

None

gunn.cli.replay module

CLI utility for replaying event logs with determinism validation.

class gunn.cli.replay.ReplayEngine(world_seed=None, verbose=False)[ソース]

ベースクラス: object

Engine for replaying event logs with deterministic behavior.

Supports replay from specified ranges with fixed random seeds for deterministic behavior and integrity validation.

パラメータ:
  • world_seed (int | None)

  • verbose (bool)

async replay_from_log(log, from_seq=0, to_seq=None, validate_integrity=True, output_file=None)[ソース]

Replay events from log within specified range.

戻り値の型:

dict[str, Any]

パラメータ:
Args:

log: EventLog to replay from from_seq: Starting sequence number (inclusive) to_seq: Ending sequence number (inclusive), None for latest validate_integrity: Whether to validate log integrity first output_file: Optional file to write replay results

Returns:

Dictionary with replay results and statistics

async gunn.cli.replay.create_sample_log(num_entries=10, world_seed=None)[ソース]

Create a sample event log for testing replay functionality.

戻り値の型:

EventLog

パラメータ:
  • num_entries (int)

  • world_seed (int | None)

Args:

num_entries: Number of entries to create world_seed: Random seed for deterministic generation

Returns:

EventLog with sample data

gunn.cli.replay.parse_replay_args(args)[ソース]

Parse replay command arguments.

戻り値の型:

Namespace

パラメータ:

args (list[str])

Args:

args: Command line arguments

Returns:

Parsed arguments namespace

async gunn.cli.replay.run_replay_command(args)[ソース]

Run the replay command with given arguments.

戻り値の型:

int

パラメータ:

args (list[str])

Args:

args: Command line arguments

Returns:

Exit code (0 for success, non-zero for error)

gunn.cli.replay.main()[ソース]

Main entry point for replay CLI.

戻り値の型:

int

Module contents