CLI reference¶
schemashift ships a schemashift CLI command.
transform¶
Apply a config to a file and write the output.
schemashift transform <FILE> [OPTIONS]
Option |
Description |
|---|---|
|
Path to a |
|
Path to a registry directory (auto-detect format) |
|
Output file path (CSV, Parquet, or JSON by extension). Prints first 20 rows to stdout if omitted. |
Exactly one of --config or --registry must be provided.
Examples:
# Explicit config
schemashift transform camstar_mes.csv --config camstar_mes.json --output result.csv
# Auto-detect from registry
schemashift transform fabx.tsv --registry ./configs/ --output result.parquet
validate¶
Check that a config file is valid — all DSL expressions parse, all required fields are present.
schemashift validate <CONFIG>
schemashift validate camstar_mes.json
# Config 'camstar_mes' is valid.
generate¶
Generate a FormatConfig for an unknown file using an LLM.
Requires pip install "schemashift[llm]" and LLM credentials in the environment (or a .env file).
schemashift generate <FILE> [OPTIONS]
Option |
Description |
|---|---|
|
YAML |
|
Save the generated config here |
|
Save the generated config to this specific path |
|
Review the config before saving |
|
LLM retry attempts on validation failure (default: 2) |
# Generate and print
schemashift generate sap_erp.csv --target-schema schemas/lot_movement.yaml
# Generate and save to registry
schemashift generate sap_erp.csv \
--registry ./configs/ \
--target-schema schemas/lot_movement.yaml
# Generate with review step
schemashift generate sap_erp.csv \
--registry ./configs/ \
--target-schema schemas/lot_movement.yaml \
--interactive
list¶
List all configs registered in a directory.
schemashift list --registry ./configs/
camstar_mes (v1) — Camstar MES lot movement export
fabx_tsv (v1) — FabX custom WIP export (tab-delimited, Unix epoch timestamps)
sap_erp (v1) — SAP ERP lot data (semicolon-delimited, German headers)
Environment variables¶
Variable |
Description |
|---|---|
|
Anthropic API key for direct Anthropic access |
|
Azure AI Foundry API key |
|
Full Azure AI Foundry endpoint URL |
|
Azure resource name (endpoint inferred if |
|
Model override for LLM generation (default: |
A .env file in the current working directory is loaded automatically when the generate command runs.