Inspecting a .b2nd, .b2frame, .b2z, or .b2d file currently requires either launching the interactive b2view TUI or writing a custom Python script. When working in non-interactive terminal sessions, remote SSH shells without a full TTY, or automated CI pipelines, users need a fast, non-interactive CLI inspection tool (similar to h5dump -H, ncdump -h, or parquet-tools meta).
src/blosc2/info.py already implements human-readable formatting, but there is no CLI script entry point.
Suggested Work
- Implement
src/blosc2/cli/b2info.py and register it in pyproject.toml under [project.scripts]:
b2info = "blosc2.cli.b2info:main"
- Support inspecting all standard Blosc2 file formats:
.b2nd, .b2z, .b2d, and .b2frame.
- Provide command-line options:
- Default output: Clean summary table (container type, shape, dtype, chunks, blocks, itemsize, uncompressed size, compressed size, compression ratio, codecs, filters).
--json: Output full metadata and layout as JSON for shell scripts and CI.
--meta: Display user metadata (meta and vlmeta dictionaries).
--tree: For TreeStore (.b2z/.b2d), print an ASCII group hierarchy.
- Add unit tests under
tests/test_cli_b2info.py.
- Add a brief guide at
doc/guides/b2info.md and link it in doc/guides/index.rst.
Inspecting a
.b2nd,.b2frame,.b2z, or.b2dfile currently requires either launching the interactiveb2viewTUI or writing a custom Python script. When working in non-interactive terminal sessions, remote SSH shells without a full TTY, or automated CI pipelines, users need a fast, non-interactive CLI inspection tool (similar toh5dump -H,ncdump -h, orparquet-tools meta).src/blosc2/info.pyalready implements human-readable formatting, but there is no CLI script entry point.Suggested Work
src/blosc2/cli/b2info.pyand register it inpyproject.tomlunder[project.scripts]:.b2nd,.b2z,.b2d, and.b2frame.--json: Output full metadata and layout as JSON for shell scripts and CI.--meta: Display user metadata (metaandvlmetadictionaries).--tree: ForTreeStore(.b2z/.b2d), print an ASCII group hierarchy.tests/test_cli_b2info.py.doc/guides/b2info.mdand link it indoc/guides/index.rst.