Skip to content

CLI Reference

EventFlow provides a command-line interface for running tests, generating diagrams, validating links, and scaffolding code.

Output Design Principles

All EventFlow CLI commands follow consistent output patterns:

ElementSymbolColorUsage
SuccessGreenPassed tests, completed operations
FailureRedFailed tests, errors
WarningYellowNon-critical issues
InfoCyanAdditional information
ProgressBlueRunning operations
PendingGrayWaiting items

Command Categories

Test Commands

  • eventflow test - Run flow scenarios as tests
  • eventflow test:binding - Run tests for a specific binding
  • eventflow test:bindings - Run tests for all bindings
  • eventflow links:report - Show binding-test link report
  • eventflow links:validate - Validate binding-test links
  • eventflow links:sync - Sync #[TestedBy] attributes
  • eventflow links:pair - Resolve placeholder references

Scaffold Commands

  • eventflow make:guard - Generate a guard binding
  • eventflow make:action - Generate an action binding
  • eventflow make:binding-test - Generate a binding test class

Utility Commands

  • eventflow diagram - Generate flow diagrams
  • eventflow bindings:list - List all discovered bindings
  • eventflow bindings:missing - List missing bindings for a flow
  • eventflow init - Initialize EventFlow configuration
  • eventflow config - Show or modify configuration

Global Options

These options work with all commands:

OptionDescription
--helpShow command help
--versionShow EventFlow version
--config=FILEUse specific config file
--quietSuppress output
--verboseVerbose output
--no-colorDisable colored output

Version Output

$ eventflow --version

EventFlow v1.0.0
PHP 8.2.0 | PHPUnit 10.5.0

Help Output

$ eventflow --help

EventFlow - Executable State Machine DSL

Usage:
  eventflow <command> [options] [arguments]

Commands:
  test              Run flow scenarios as tests
  test:binding      Run tests for a specific binding
  test:bindings     Run tests for all bindings

  links:report      Show binding-test link report
  links:validate    Validate binding-test links
  links:sync        Sync #[TestedBy] attributes
  links:pair        Resolve placeholder references

  make:guard        Generate a guard binding
  make:action       Generate an action binding
  make:binding-test Generate a binding test class

  diagram           Generate flow diagrams

  bindings:list     List all discovered bindings
  bindings:missing  List missing bindings for a flow

  init              Initialize EventFlow configuration
  config            Show or modify configuration

Options:
  -h, --help        Show help for a command
  -V, --version     Show version information
  -q, --quiet       Suppress output
  -v, --verbose     Verbose output
  --no-color        Disable colored output
  --config=FILE     Use specific config file

Run 'eventflow <command> --help' for command-specific help.

Released under the MIT License.