(import (cook parse-internals) (cook debug) (chibi) (chibi app) (chibi config) (chibi io) (chibi test)) (define (cook cfg spec . args) (display "called cook with: ") (display args) (newline)) (define (read-cook cfg spec recipe-file) (let ((recipe (parse-cook (file->string recipe-file)))) (display (cook->list recipe)))) (run-application `(cook "Cooklang recipe tool" (@ (help boolean (#\h ) "show this help")) (or (help "Show this help" () (,app-help-command)) (read "Read recipe in the terminal" () (,read-cook recipe))) (,cook files ...)) (command-line))