Skip to content

v0.1.57 - Centralized use_event Option (2025-12-16)

What Changed?

This release refactors the CLI options layer by moving the use_event/--use-duration toggle from inline command definitions to a centralized Options.use_event() method. This eliminates code duplication and maintains consistency with other option definitions in the Options class. The change is purely architectural with no user-facing impact.


What's New

Refactoring: Centralized Options Definition

What it does: Moves the use_event/--use-duration toggle option to the Options class as a reusable method, following the existing pattern of other CLI options like use_flat() and event_timeout().

How to use it: No change for users. The --use-event and --use-duration flags work exactly as before in the read and measure commands.

Code example (for developers):

# Before: Inline definition
use_event: bool = typer.Option(
    True,
    "--use-event/--use-duration",
    help="Read by event count (default) or by duration in seconds",
)

# After: Centralized definition
use_event: bool = Options.use_event()

Installation

Quick Start

# Get the release
git checkout vX.Y.Z

# Setup
task env:setup

# Run CLI
uv run kazunoko --help

What's Different from the Last Version?

✅ Added

  • New use_event() method to Options class for centralized option definition

🔧 Changed

  • read command now uses Options.use_event() instead of inline option definition
  • measure command now uses Options.use_event() instead of inline option definition
  • Improved consistency across CLI option definitions

🐛 Fixed

  • Reduced code duplication in command definitions

Is It Safe to Upgrade?

Backward Compatible: Yes

  • No user-facing changes. All CLI commands work exactly as before.
  • No breaking changes to the Python API.

Tests Passed

  • ✅ Builds without errors
  • ✅ Linting passed (ruff check)
  • ✅ No breaking changes to existing CLI commands

Release Details

  • Date: 2025-12-16
  • Version: v0.1.57
  • Files Changed: 3 (options.py, cli.py, CLAUDE.md)
  • Commits: e4e42dd, eb1d488

Next Steps

  • Consider applying similar centralization patterns to other inline option definitions
  • Continue improving code consistency and maintainability across the CLI layer