BoundaryML/baml · error

no runnable target `{name}` found. use `baml run --list` to

Error message

no runnable target `{name}` found.
use `baml run --list` to see available targets.

What it means

The positional target given to `baml run <target>` matched no runnable target. Candidate space spans scripts from `baml.toml` `[scripts]`, namespaces, user functions, and `.baml` files in the current directory; when no candidate is close (containment or Jaro-Winkler > 0.7), this error is thrown telling the user to run `baml run --list`.

Source

Thrown at baml_language/crates/baml_cli/src/run_command.rs:1418

                    label: format!("{file_name} (file)"),
                });
            }
        }
        candidates.sort_by(|a, b| a.name.cmp(&b.name));

        let suggestions: Vec<&str> = candidates
            .iter()
            .filter(|c| {
                c.name.contains(name)
                    || name.contains(&c.name)
                    || strsim::jaro_winkler(&c.name, name) > 0.7
            })
            .take(5)
            .map(|c| c.label.as_str())
            .collect();

        if suggestions.is_empty() {
            anyhow!(
                "no runnable target `{name}` found.\n\
                 use `baml run --list` to see available targets."
            )
        } else {
            anyhow!(
                "no runnable target `{name}` found. Did you mean one of:\n{}",
                suggestions
                    .iter()
                    .map(|s| format!("  - {s}"))
                    .collect::<Vec<_>>()
                    .join("\n")
            )
        }
    }

    // ========================================================================
    // --list
    // ========================================================================

View on GitHub (pinned to bd85ce9dee)

Solutions

  1. Run `baml run --list` to enumerate all runnable targets (scripts, namespaces, functions, files).
  2. Correct the target name on the command line.
  3. If the script is missing, add it under `[scripts]` in baml.toml.
  4. Change to the project root (or the directory containing the relevant `.baml` files) before running.

Example fix

// before
baml run clsify
// after
baml run classify
Defensive patterns

Strategy: validation

Validate before calling

// shell: check target against baml.toml scripts and --list before running
baml run --list | grep -qx "$TARGET" || { echo "unknown target $TARGET"; exit 1; }

Try / catch

baml run "$TARGET" || { echo "run 'baml run --list' to see targets"; exit 1; }

Prevention

When it happens

Trigger: Running `baml run <name>` where `<name>` is not a script defined in `baml.toml` `[scripts]`, not a namespace, not a user function, and not a `.baml` file in the current directory.

Common situations: Typo in a script/namespace/function name; the `[scripts]` section was renamed or removed from baml.toml; running from a subdirectory where the target `.baml` file isn't resolvable; referencing a target that only exists in another branch.

Related errors


AI-assisted analysis of BoundaryML/baml@bd85ce9dee (2026-09-12). Data as JSON: /api/errors/d4af4886366966da. Report an issue: GitHub.