panproto-cli-0.17.2 is not a library.
panproto-cli
Command-line interface for panproto. The binary is called schema.
Provides subcommands for schema validation, migration checking, breaking change detection, record lifting, protolens-based data conversion, and schematic version control.
Installation
Usage
# Validate a schema against a protocol
# Diff two schemas (use --theory for sort/op/equation-level diff)
# One-step data conversion between schemas (auto-generates a protolens)
# Auto-generate a lens with human-readable summary
# Apply a saved lens or protolens chain to data
# Verify lens laws (GetPut, PutGet)
# Compose lenses or protolens chains
# Inspect a protolens chain
# Check applicability of a protolens chain
# Lift a protolens chain to another protocol
# Derive a lens from VCS commit history
# Check a migration (use --typecheck for GAT-level validation)
# Type-check a migration at the GAT level
# Verify a schema satisfies its protocol theory's equations
# Generate minimal test data from a protocol theory
# Simplify a schema by merging equivalent elements
# Initialize a schema repository and commit
# Branch, evolve, merge
# Fuse a multi-step chain into a single protolens
# Parse a Haskell-style expression and print its AST
# Evaluate an expression
# Pretty-print in canonical form
# Check syntax without evaluating
# Lift a record through a migration
# Migrate data to match current schema version
# Sync data with incremental edit tracking
# Show data staleness
# Stage data alongside schema
# Checkout and migrate data
# Merge and migrate data
Subcommands
| Command | Description |
|---|---|
validate |
Validate a schema file against a protocol (also type-checks the protocol theory) |
check |
Check existence conditions for a migration (--typecheck to also GAT-validate the morphism) |
diff |
Diff two schemas and report structural changes (--theory to show sort/op/equation-level diff) |
data convert |
One-step data conversion between schemas via auto-generated protolens |
data migrate |
Migrate data to match current schema version (--dry-run, --range, --backward) |
data sync |
Sync data files to target schema version (--edits to record edit log) |
data status |
Show data staleness |
lens generate |
Auto-generate a lens between two schemas (--fuse to merge steps) |
lens compose |
Compose two protolens chains |
lens apply |
Apply a saved lens or protolens chain to data |
lens verify |
Verify lens laws (GetPut, PutGet) |
lens inspect |
Print human-readable summary of a protolens chain |
lift |
Apply a migration to a record |
scaffold |
Generate minimal test data from a protocol theory via free model construction |
normalize |
Simplify a schema by merging equivalent elements via quotient |
typecheck |
Type-check a migration between two schemas at the GAT level |
verify |
Verify a schema satisfies its protocol theory's equations by model checking |
init |
Initialize a .panproto/ repository |
add |
Stage a schema for the next commit (--data to stage data files alongside) |
commit |
Commit staged changes (--skip-verify to bypass GAT equation verification) |
status |
Show working state |
log |
Walk commit history |
show |
Inspect an object |
branch |
Create, list, or delete branches |
tag |
Create, list, or delete tags |
checkout |
Switch branch or detach HEAD (--migrate to migrate data) |
merge |
Three-way schema merge (--verbose to show pullback overlap details, --migrate to migrate data) |
rebase |
Replay commits onto another branch |
cherry-pick |
Apply a single commit's migration |
reset |
Move HEAD / unstage / restore |
stash |
Save or restore working state |
reflog |
Show ref mutation history |
bisect |
Binary search for breaking commit |
blame |
Show which commit introduced an element |
gc |
Garbage collect unreachable objects |
expr parse |
Parse a Haskell-style expression and print the AST |
expr eval |
Parse and evaluate an expression, print result as JSON |
expr fmt |
Parse and pretty-print in canonical form |
expr check |
Validate expression syntax and report errors |
expr gat-eval |
Evaluate a JSON-encoded GAT term from a file |
expr gat-check |
Type-check a JSON-encoded GAT term against a theory |