CLI How-Tos
The CLI is available as markback or the shorthand mb. It supports adding feedback, linting, normalization, record listing, statistics, format conversion, and V1-to-V2 upgrades.
Add Feedback
bash
# Add feedback to a file (creates or appends to .mb sidecar)
mb ./data/output.txt "approved; quality=high"
# With additional metadata
mb ./data/output.txt "good; clarity=high" --by alice --tag review --tag batch-1
# Specify the input/prompt that produced the content
mb ./data/output.txt "approved" --input ./prompts/prompt.txtLint Records
bash
# Lint a file or directory
mb --lint data.mb
mb --lint ./datasets/
# JSON output
mb --lint data.mb --json
# Skip checks
mb --lint data.mb --no-source-check --no-canonical-checkUse linting to catch structural errors (missing feedback, malformed headers) and format warnings (non-canonical layout).
Normalize to Canonical Format
bash
# Normalize in place
mb --normalize input.mbCanonicalization ensures stable diffs and consistent formatting across records. V1 headers are automatically upgraded to V2.
List Records
bash
mb --list data.mb
mb --list ./datasets/Listing is useful for quick inspection or piping into other tools.
Statistics
bash
mb --stats data.mb
mb --stats ./datasets/Shows record counts, tag breakdowns, and reviewer summaries.
Convert Between Formats
bash
mb --convert input.mb --to multi
mb --convert input.mb --to compactSupported --to values: single, multi, compact.
Upgrade V1 Files to V2
bash
# Upgrade V1 files in place (replaces @uri→@id, @source→@file, @prior→@input)
mb --upgrade *.mb
# Preview what would change without writing
mb --upgrade *.mb --dry-runStorage Workflows
Inline Records
project/
training-data.mbbash
mb --lint training-data.mb
mb --list training-data.mbCompact Label List
project/
image-labels.mbbash
mb --lint image-labels.mb
mb --stats image-labels.mbSidecar Files
project/
data/
output.txt
output.txt.mb
image.png
image.png.mbbash
mb --lint data/Configuration
FILE_MODE in .env controls how outputs are written:
git: overwrite output files in place (best for Git workflows)versioned: never overwrite; append a timestamp to new output files
Create a starter config:
bash
mb --init