Skip to content

v0.1.26 - Simplified CLI Format Handling (2025-12-07)

What Changed?

This release improves the CLI commands by extending SSV, TSV, and LTSV format support to the read command and simplifying the internal format handling logic. The read command now uses a unified approach to display all supported formats through the ResponseFormatter.display() method, improving code maintainability without changing the public API.


What's New

Main Feature: Extended Format Support in read Command

What it does: The read command now supports all seven output formats (table, JSONL, JSON, CSV, SSV, TSV, LTSV) just like the query and status commands. The internal implementation has been simplified by removing special-case handling for different formats.

How to use it:

# Read with space-separated values format
kazunoko read --format ssv --count 5

# Read with tab-separated values format
kazunoko read --format tsv --count 5

# Read with labeled tab-separated values (key=value pairs)
kazunoko read --format ltsv --count 3

# All existing formats continue to work
kazunoko read --format table --count 2
kazunoko read --format jsonl --count 10
kazunoko read --format json --count 1

Code example:

# All formats work seamlessly with the unified display approach
fmt = ResponseFormatter(response, use_flat=True)
fmt.display(format="ssv")   # Space-separated values
fmt.display(format="tsv")   # Tab-separated values
fmt.display(format="ltsv")  # Labeled tab-separated values

Installation

Quick Start

# Get the release
git checkout v0.1.26

# Setup
task env:setup

# Run CLI
uv run kazunoko --help

What's Different from the Last Version?

✅ Added

  • Support for SSV, TSV, LTSV formats in the read command (previously only available in query and status)
  • Unified format handling in read command using ResponseFormatter.display()

🔧 Changed

  • Simplified read command implementation by removing special-case format handling
  • Read command now uses ResponseFormatter.display(format=format) for all output formats instead of custom logic per format

🐛 Fixed

  • Fixed read command not supporting new SSV, TSV, LTSV formats (was returning "Unknown format" error)

Is It Safe to Upgrade?

Backward Compatible: Yes

  • All existing format options in the read command continue to work as before
  • New formats (SSV, TSV, LTSV) are now available in all commands (query, read, status)
  • No breaking changes to CLI options or output behavior
  • The fix for format support is transparent to users

Tests Passed

  • ✅ Builds without errors
  • ✅ Pre-commit hooks (ruff, mypy, commitizen)
  • ✅ All format options work correctly in read command (table, jsonl, json, csv, ssv, tsv, ltsv)
  • ✅ Unified display approach produces identical output to previous implementation

Release Details

  • Date: 2025-12-07
  • Version: v0.1.26
  • Files Changed: 1 (cli.py)
  • Commits: 3 commits
  • fix: update read command to use _format_dict after to_csv_with_header removal
  • feat: add ssv, tsv, ltsv format support to read command
  • refactor: simplify read command format handling

Next Steps

  • Consider adding binary output formats (Protocol Buffers, MessagePack)
  • Explore streaming output for large datasets
  • Add format validation/error handling enhancements