Skip to main content

Beaver CLI

Beaver now includes a powerful CLI with validation, analysis, and code generation features:

See Available Examples​

python beaver_cli.py examples
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:

  1. Validate first: python beaver_cli.py validate --input your_model.bvr
  2. Generate code: python beaver_cli.py generate --input your_model.bvr --check-syntax
  3. Run your pipeline: python generated_pipeline.py