Command-line interface for validating and running Rhylthyme real-time program schedules.
# Clone the repository
git clone https://github.com/rhylthyme/rhylthyme-cli-runner.git
cd rhylthyme-cli-runner
# Install the package
pip install -e .
# Or install with development dependencies
pip install -e ".[dev]"pip install rhylthyme-cli-runnerThe example programs referenced in this documentation are maintained in a separate repository. To use them:
# Navigate to the parent directory of rhylthyme-cli-runner
cd ..
# Clone the examples repository
git clone https://github.com/rhylthyme/rhylthyme-examples.git
# Run examples using relative paths
cd rhylthyme-cli-runner
rhylthyme run ../rhylthyme-examples/programs/breakfast_schedule.json# From within the rhylthyme-cli-runner directory
git clone https://github.com/rhylthyme/rhylthyme-examples.git examples
# Run examples directly
rhylthyme run examples/programs/breakfast_schedule.json# Download a specific example file
curl -O https://raw.githubusercontent.com/rhylthyme/rhylthyme-examples/main/programs/breakfast_schedule.json
# Run the downloaded file
rhylthyme run breakfast_schedule.jsonThe Rhylthyme CLI provides commands for working with real-time program schedules defined using the Rhylthyme JSON or YAML schema.
Validate a program file against the schema to ensure it's properly formatted:
# Validate a JSON or YAML program file
rhylthyme validate my_program.json
# Validate with verbose output
rhylthyme validate my_program.json --verbose
# Validate with JSON output for CI/scripting
rhylthyme validate my_program.json --json
# Validate in strict mode (requires all tasks in resourceConstraints)
rhylthyme validate my_program.json --strictRun a program with an interactive terminal UI for monitoring and controlling execution:
# Run a program file
rhylthyme run examples/programs/breakfast_schedule.json
# Run with automatic start (no manual trigger needed)
rhylthyme run examples/programs/breakfast_schedule.json --auto-start
# Run with a different time scale (2x faster)
rhylthyme run examples/programs/breakfast_schedule.json --time-scale 2.0
# Run with a specific environment
rhylthyme run examples/programs/breakfast_schedule.json --environment kitchen
# Run without validation (if you're sure the file is valid)
rhylthyme run examples/programs/breakfast_schedule.json --no-validateCreate an optimized version of a program to reduce resource contention:
# Optimize a program and save to new file
rhylthyme plan examples/programs/breakfast_schedule.json optimized_breakfast.json
# Optimize with verbose output
rhylthyme plan examples/programs/breakfast_schedule.json optimized_breakfast.json --verboseList and validate environment catalogs:
# List all available environments
rhylthyme environments
# List environments in JSON format
rhylthyme environments --format json
# Validate all environment files
rhylthyme validate-environments
# Show information about a specific environment type
rhylthyme environment-info kitchen{
"programId": "breakfast-schedule",
"name": "Breakfast Schedule",
"description": "Coordinated breakfast preparation",
"environmentType": "kitchen",
"startTrigger": {
"type": "manual"
},
"tracks": [
{
"trackId": "eggs",
"name": "Scrambled Eggs",
"steps": [
{
"stepId": "crack-eggs",
"name": "Crack and Whisk Eggs",
"startTrigger": {
"type": "programStart"
},
"duration": {
"type": "fixed",
"seconds": 60
}
}
]
}
],
"resourceConstraints": [
{
"task": "stove-burner",
"maxConcurrent": 2,
"description": "Maximum stove burners"
}
],
"version": "1.0.0"
}When running a program, the interactive UI provides these controls:
- Space: Start/stop the program
- Enter: Trigger manual steps
- Arrow keys: Navigate between steps
- q: Quit the program
- r: Refresh the display
- s: Sort by different criteria
Validates program files against the schema.
Options:
--schema PATH: Path to schema file (default: built-in schema)--verbose, -v: Show detailed validation information
Runs programs with interactive terminal UI.
Options:
--schema PATH: Path to schema file (default: built-in schema)-e, --environment TEXT: Environment ID to use--time-scale FLOAT: Time scale factor (default: 1.0)--validate / --no-validate: Validate before running (default: True)--auto-start: Automatically start without manual trigger
Optimizes program schedules to reduce resource contention.
Options:
--verbose, -v: Show detailed planning information
Lists available environment catalogs.
Options:
--format, -f: Output format (table, json, yaml)
Validates environment catalog files.
Options:
--environments-dir PATH: Directory containing environment files--verbose, -v: Show detailed validation information
Shows information about a specific environment type.
- Clone the repository
- Install development dependencies:
pip install -e ".[dev]" - Run tests:
pytest
Apache License 2.0