BoundaryML/baml · warning
Unknown command: . Type :help for available commands.
Error message
Unknown command: {}. Type :help for available commands. What it means
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.
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
Example fix
// before :loade ./baml_src // after :load ./baml_src
Defensive patterns
Strategy: validation
Validate before calling
// Pre-validate against the known command set before dispatch
const COMMANDS: &[&str] = &["load","l","reset","r","type","t","thir","help","quit","exit","q"];
let name = input[1..].split_whitespace().next().unwrap_or("");
let ok = COMMANDS.contains(&name); Try / catch
match result { Err(e) if e.to_string().starts_with("Unknown command:") => println!("{e}; try :help"), other => { let _ = other; } } Prevention
- Run :help before trying unfamiliar commands
- Use documented aliases (l, r, t, q)
- Copy command names from :help output rather than retyping
When it happens
Trigger: Typing an unrecognized command like :foo, :functions (if unsupported), or misspelling a known command such as :loade in handle_command.
Common situations: 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.
Understand the failure class
Background: "Unknown argument", "Invalid value", and "must be one of": invalid CLI argument errors explained — this error's family across 35 libraries.
Related errors
- Empty command
- unknown toolchain command
- Usage: :load (or :l )
- Usage: :type (or :t )
- active BAML toolchain does not include…
AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12).
Data as JSON: /api/errors/0c43fd4cdc306ee0.
Report an issue: GitHub.
Appendix: source
Thrown at engine/baml-runtime/src/cli/repl.rs:1697
:quit (:q) - Exit the REPL
Expression syntax:
x = expr - Assign expression result to variable x
variable_name - Show value of variable
Supported literals:
Numbers: 42, 3.14
Strings: "hello world"
Booleans: true, false
Null: null
Arrays: [1, 2, 3]"#
.to_string(),
)),
"quit" | "exit" | "q" => {
println!("Goodbye!");
Ok(None)
}
_ => Err(anyhow!(
"Unknown command: {}. Type :help for available commands.",
parts[0]
)),
}
}
}
View on GitHub (pinned to bd85ce9dee)