Beaver CLI
Beaver now includes a powerful CLI with validation, analysis, and code generation features:
See Available Examplesâ
python beaver_cli.py examples
Validate Your Model (Recommended First Step)â
python beaver_cli.py validate --input examples/linear.bvr --verbose
Generate Python Codeâ
# Basic generation with validation
python beaver_cli.py generate --input examples/linear.bvr --output my_pipeline.py
# Generation with comprehensive checking
python beaver_cli.py generate --input examples/linear.bvr --output my_pipeline.py --check-syntax --verbose
# Preview without creating files
python beaver_cli.py generate --input examples/linear.bvr --dry-run
Analyze Your Modelsâ
# Analyze a specific file
python beaver_cli.py analyze --input examples/linear.bvr
# Analyze all examples
python beaver_cli.py analyze --directory examples
Help and Documentationâ
# Show extended help with examples
python beaver_cli.py help
# Get help for specific commands
python beaver_cli.py generate --help
đ§ Alternative: Direct Generator Usageâ
You can still use the original generator directly:
python beaver/gen_enhanced.py --metamodel <PATH-TO-YOUR-METAMODEL> --generated_file_name <PATH-TO-THE-GENERATED-FILE> --check-syntax --verbose
Recommended Workflow:
- Validate first:
python beaver_cli.py validate --input your_model.bvr
- Generate code:
python beaver_cli.py generate --input your_model.bvr --check-syntax
- Run your pipeline:
python generated_pipeline.py