zeroclaw-labs/zeroclaw · error

cli-alias-rename-invalid

cli-alias-rename-invalid

Error message

invalid new alias: {$message}

What it means

Fires in rename_config when the library's RenameError::InvalidName is returned — the proposed new alias fails name validation (reserved characters, empty, malformed). The error message from the underlying rename operation is interpolated into the CLI text via the cli-alias-rename-invalid Fluent key. The faulting input is the 'to' argument of the rename command; choose a name satisfying the alias naming rules.

Solutions

  1. Fix the alias according to the validation message: use allowed characters and a non-reserved, non-empty name.
  2. Pick a different alias that does not collide with existing aliases or reserved names.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/alias_cli/mod.rs:323 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/eb4a5afb50b1ec48. Report an issue: GitHub.

Appendix: source

Thrown at src/alias_cli/mod.rs:323

                        ("section", section.as_str()),
                        ("from", from),
                        ("to", to),
                        ("count", count.as_str())
                    ],
                    "renamed {$section}.{$from} → {$section}.{$to} (rewrote {$count} reference path(s))"
                )
            );
            Ok(())
        }
        Err(RenameError::NotFound(p)) => bail!(
            "{}",
            mta(
                "cli-alias-not-configured",
                &[("path", p.as_str())],
                "{$path} is not configured"
            )
        ),
        Err(RenameError::InvalidName(m)) => bail!(
            "{}",
            mta(
                "cli-alias-rename-invalid",
                &[("message", m.as_str())],
                "invalid new alias: {$message}"
            )
        ),
        Err(RenameError::Reserved(a)) => bail!(
            "{}",
            mta(
                "cli-alias-rename-reserved",
                &[("alias", a.as_str())],
                "alias `{$alias}` is reserved and cannot be renamed"
            )
        ),
        Err(RenameError::PostCondition(m)) => bail!(
            "{}",
            mta(

View on GitHub (pinned to 88bb9c8533)