Skip to content

CLI reference

The main commands are:

CommandPurpose
flexr check SPECParse and diagnose a specification
flexr generate SPEC -o OUTPUTWrite generated Ruby
flexr trace SPEC INPUTShow automaton state, acceptance, and transitions
flexr --helpPrint command and option help

Use check in CI and treat warnings according to the compatibility policy of your project. trace describes DFA behavior; it is not an input-string logging command.

Terminal window
bundle exec flexr check examples/calculator/lexer.flexr.rb
bundle exec flexr generate examples/calculator/lexer.flexr.rb -o tmp/calculator_lexer.rb

For complete options, output formats, and exit status behavior, see the repository’s CLI reference.