jdx/mise · error
invalid compose project_name '{name}': use lowercase letters
Error message
invalid compose project_name '{name}': use lowercase letters, digits, dashes, and underscores What it means
mise's compose integration validates the compose project_name from configuration. Project names must start with an ASCII lowercase letter or digit and contain only lowercase letters, digits, dashes, and underscores, matching Docker Compose naming rules. The library throws this error when a configured project name violates those character constraints.
Source
Thrown at src/system/compose.rs:1126
Ok(std::iter::once(resolved.to_string_lossy().to_string())
.chain(args.iter().cloned())
.collect())
}
fn validate_project_name(name: Option<&str>) -> Result<()> {
let Some(name) = name else {
return Ok(());
};
if name.is_empty()
|| !name
.chars()
.next()
.is_some_and(|character| character.is_ascii_lowercase() || character.is_ascii_digit())
|| !name.chars().all(|character| {
character.is_ascii_lowercase() || character.is_ascii_digit() || "-_".contains(character)
})
{
bail!(
"invalid compose project_name '{name}': use lowercase letters, digits, dashes, and underscores"
);
}
Ok(())
}
fn parse_dependency(value: &str) -> Result<ResourceId> {
let Some((kind, name)) = value.split_once(':') else {
bail!("invalid compose dependency '{value}': expected '<kind>:<name>'");
};
if name.is_empty()
|| !matches!(
kind,
"package" | "file" | "directory" | "service" | "user" | "group"
)
{
bail!(
"invalid compose dependency '{value}': supported kinds are package, file, directory, service, user, and group"View on GitHub (pinned to afd2eddd3a)
Solutions
- Rename the project_name to use only lowercase letters, digits, dashes, and underscores
- Ensure the first character is a lowercase letter or digit
- Remove uppercase letters, dots, spaces, and other punctuation from the name
Example fix
// before (mise.toml) [compose] project_name = "My.Project" // after [compose] project_name = "my-project"
Defensive patterns
Strategy: validation
Validate before calling
fn valid_project_name(name: &str) -> bool {
name.chars().next().is_some_and(|c| c.is_ascii_lowercase() || c.is_ascii_digit())
&& name.chars().all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || c == '-' || c == '_')
} Prevention
- Keep project names lowercase-kebab-case by convention
- Never reuse names containing dots or uppercase from other tools
- Check the first character is alphanumeric before saving config
When it happens
Trigger: A compose project_name in mise.toml starts with a dash/underscore, contains uppercase letters, spaces, dots, slashes, or other symbols, or is empty/invalid at the first character.
Common situations: Users copy a Docker Compose project name like 'MyProject' or 'my.project' from docker-compose usage; camelCase names or names with spaces/periods from other tools are pasted into mise.toml.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- invalid compose dependency '{value}': expected '<kind>:<name
- invalid compose dependency '{value}': supported kinds are pa
- invalid compose {kind} value '{value}'
- compose {kind} cannot contain empty values or NUL bytes
- invalid bootstrap secret name '{name}': use ASCII letters, d
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/f36c6d5f21f8cc51.
Report an issue: GitHub.