Expand description
CLI module for the slab file maintenance tool.
This module implements the slab binary, a command-line interface for
creating, inspecting, and transforming slabtastic files. Each
subcommand lives in its own child module and is dispatched by
run.
§Subcommands
| Command | Description |
|---|---|
analyze | Display file structure and statistics |
check | Validate a slab file for structural errors |
get | Retrieve records by ordinal (hex, base64, or raw output) |
import | Import records from external formats (CSV, JSON, etc.) |
export | Export records to external formats or another slab file |
append | Append records from stdin or a source file |
rewrite | Repack a slab file with new page settings |
explain | Display block diagrams of page layouts |
namespaces | List all namespaces in a slab file |
completions | Generate shell completions (bash, zsh, fish, etc.) |
§Helpers
ProgressReporter— optional stderr progress line for long-running commands.make_writer_config— build aWriterConfigfrom optional CLI flags, falling back to defaults.write_with_buffer_rename— atomic write via a.buffertemp file followed by rename.
Modules§
- analyze
slab analyzesubcommand — display file structure and statistics.- append
slab appendsubcommand — append data to an existing slabtastic file.- check
slab checksubcommand — validate slabtastic file structure.- explain
slab explainsubcommand — render page layouts as block diagrams.- export
slab exportsubcommand — export content from a slab file.- get
slab getsubcommand — retrieve records by ordinal.- import
slab importsubcommand — import data from external file formats into a slab file.- namespaces
slab namespacessubcommand — list all namespaces in a slab file.- ordinal_
range - Ordinal range parser for CLI commands.
- rewrite
slab rewritesubcommand — rewrite a slabtastic file, reordering by ordinal and repacking to new page settings in a single pass.
Structs§
- Cli
- slab — slabtastic file maintenance tool
- Progress
Reporter - Optional progress reporter that prints record counts to stderr.
Enums§
- Command
- Available subcommands.
Functions§
- is_
new_ file - Return
truewhen the target path does not yet exist, meaning the operation will create a new file (as opposed to appending). - make_
writer_ config - Build a
WriterConfigfrom optional CLI flags, falling back to defaults. - run
- Dispatch to the appropriate subcommand.
- write_
with_ buffer_ rename - Write to a
.buffersuffixed temporary file, then rename to the target path on success.