pub fn format_error(msg: &str) -> String
Format an error message consistently for stderr output.
All error output in the CLI should flow through this function so that the format stays consistent across all commands and run modes.