{"record":{"id":"0c43fd4cdc306ee0","repo":"BoundaryML/baml","slug":"unknown-command-type-help-for-available-commands","errorCode":null,"errorMessage":"Unknown command: {}. Type :help for available commands.","messagePattern":"Unknown command: (.+?)\\. Type :help for available commands\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"engine/baml-runtime/src/cli/repl.rs","lineNumber":1697,"sourceCode":"  :quit (:q)         - Exit the REPL\n\nExpression syntax:\n  x = expr       - Assign expression result to variable x\n  variable_name  - Show value of variable\n\nSupported literals:\n  Numbers: 42, 3.14\n  Strings: \"hello world\"\n  Booleans: true, false\n  Null: null\n  Arrays: [1, 2, 3]\"#\n                    .to_string(),\n            )),\n            \"quit\" | \"exit\" | \"q\" => {\n                println!(\"Goodbye!\");\n                Ok(None)\n            }\n            _ => Err(anyhow!(\n                \"Unknown command: {}. Type :help for available commands.\",\n                parts[0]\n            )),\n        }\n    }\n}\n","sourceCodeStart":1679,"sourceCodeEnd":1704,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/engine/baml-runtime/src/cli/repl.rs#L1679-L1704","documentation":"REPL dispatcher fallback: the typed colon-command entered is not one of the known commands (load, reset, vars, thir, help, quit, etc.). The match on parts[0] exhausted every arm, so the input is echoed back with a pointer to :help rather than being evaluated as an expression.","triggerScenarios":"Typing an unrecognized command like :foo, :functions (if unsupported), or misspelling a known command such as :loade in handle_command.","commonSituations":"Typos in command names, using commands from other REPLs (e.g. :r for run instead of reset), assuming commands that this REPL version does not implement.","solutions":["Run :help to list supported commands","Check spelling of the command (e.g. :load not :loade, :q to quit)","Use the documented aliases: l/r/t/q for load/reset/type/quit"],"exampleFix":"// before\n:loade ./baml_src\n// after\n:load ./baml_src","handlingStrategy":"validation","validationCode":"// Pre-validate against the known command set before dispatch\nconst COMMANDS: &[&str] = &[\"load\",\"l\",\"reset\",\"r\",\"type\",\"t\",\"thir\",\"help\",\"quit\",\"exit\",\"q\"];\nlet name = input[1..].split_whitespace().next().unwrap_or(\"\");\nlet ok = COMMANDS.contains(&name);","typeGuard":null,"tryCatchPattern":"match result { Err(e) if e.to_string().starts_with(\"Unknown command:\") => println!(\"{e}; try :help\"), other => { let _ = other; } }","preventionTips":["Run :help before trying unfamiliar commands","Use documented aliases (l, r, t, q)","Copy command names from :help output rather than retyping"],"tags":["repl","cli","unknown-command"],"backgroundTag":"invalid-cli-argument","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}