Skip to content

v0.3.1

Latest

Choose a tag to compare

@isarandi isarandi released this 25 Feb 18:30

What's New

Unified CLI

Single barecat command with 23 subcommands replaces the old standalone commands (barecat-create, barecat-extract, etc.). Legacy commands still work but emit deprecation warnings.

New Commands

  • barecat shell — interactive REPL for exploring archives
  • barecat browse — ranger-like TUI file browser
  • barecat ncdu — ncdu-like disk usage viewer
  • barecat rsync — rsync-like sync between filesystem and archives
  • barecat find — search for files (like /usr/bin/find)
  • barecat tree — directory tree display
  • barecat du — disk usage summary
  • barecat subset — create filtered copy of archive
  • barecat reshard — change shard size limits
  • barecat completion-script — bash/zsh shell completions

CLI Improvements

  • -C/--directory works in any position (like tar)
  • barecat verify prints summary on success
  • barecat merge gives helpful error on duplicate paths

New I/O Layer

  • BarecatFileObject — proper file-like objects with read(), write(), seek(), readinto()
  • DecodedView — dict-like wrapper for automatic codec encoding/decoding (replaces auto_codec parameter)

API Improvements

  • __repr__ on Barecat, BarecatFileInfo, BarecatDirInfo
  • Barecat(path) constructor accepts PathLike
  • Shard size accepts strings like "1G", "500M"
  • Core library uses logging module instead of print()

Bug Fixes

  • readinto() correctly handles buffer slices via memoryview
  • open('w') on a read-only archive raises ValueError instead of silently failing
  • walk() returns '.' for root directory, matching os.walk convention
  • read_index() no longer crashes (was calling non-existent .items())

Deprecations (targeted for removal in 1.0)

  • barecat.open() → use Barecat() directly
  • auto_codec parameter → use DecodedView
  • get_cached_reader() default will change from auto_codec=True to False in 1.0
  • extract(), read_index(), write_index() module-level functions
  • Legacy CLI commands (barecat-create, etc.)

Infrastructure

  • Package restructured into submodules (core/, cli/, io/, maintenance/, util/, tui/, formats/)
  • 608 tests across 15 test files
  • CI with Python 3.9, 3.10, 3.11, 3.12, 3.13
  • Pre-commit hooks (ruff lint + format)
  • Comprehensive Diátaxis-structured documentation