feat(alias): rename alias to tool-alias, add shell-alias command#7357
Conversation
…alias]` config - Rename CLI command from `alias` to `tool-alias` (keeping `alias` as hidden alias for backwards compatibility) - Change `set_alias` and `set_backend_alias` to write to `[tool_alias]` section instead of deprecated `[alias]` - Update `remove_alias` and `remove_backend_alias` to check both sections for backwards compatibility - Update tests to use `[tool_alias]` section This fixes the confusing situation where the deprecation warning for `[alias]` in config files told users to use `[tool_alias]`, but the CLI command `mise alias` was writing to the deprecated `[alias]` section. Fixes #7353 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR renames the mise alias command to mise tool-alias and updates the configuration storage to use the [tool_alias] section instead of the deprecated [alias] section. The changes maintain backwards compatibility by keeping alias and aliases as hidden aliases for the command.
Key changes:
- Command renamed from
aliastotool-aliaswith backwards-compatible hidden aliases - Configuration writes now target
[tool_alias]instead of[alias] - Removal operations check both
[tool_alias]and[alias]sections for comprehensive cleanup
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/cli/mod.rs | Updates command enum and match arm from Alias to ToolAlias |
| src/cli/alias/mod.rs | Renames command to tool-alias and adds backwards-compatible aliases |
| src/config/config_file/mise_toml.rs | Updates config operations to use [tool_alias] section and handles both sections during removal |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| alias = "alias", | ||
| alias = "aliases" |
There was a problem hiding this comment.
The backwards-compatible aliases should be marked as hidden to discourage their use in favor of the new tool-alias command name. Add hide = true to these alias attributes or use hidden_alias instead of alias.
| alias = "alias", | |
| alias = "aliases" | |
| hidden_alias = "alias", | |
| hidden_alias = "aliases" |
| visible_alias = "a", | ||
| name = "tool-alias", | ||
| about = "Manage tool version aliases.", | ||
| alias = "alias", | ||
| alias = "aliases" | ||
| )] |
There was a problem hiding this comment.
Bug: Short alias a removed without backward compatibility
The original command had visible_alias = "a", allowing users to run mise a as a shortcut for the alias command. This was removed during the rename to tool-alias. While the PR explicitly aims to maintain backward compatibility by keeping alias and aliases as hidden aliases, the removal of the a shortcut is an undocumented breaking change that may affect existing workflows and scripts relying on mise a.
There was a problem hiding this comment.
Bug: Shallow merge loses old aliases when adding new ones
When a user has existing aliases in the deprecated [alias] section and adds a new alias via set_alias, the existing aliases for that tool are lost when querying via aliases(). The set_alias function now writes to self.tool_alias instead of self.alias, but the aliases() merge logic at line 669 uses combined.insert(k, v) which replaces the entire Alias entry rather than merging the versions maps. This means if self.alias["node"] has version "16" and self.tool_alias["node"] has version "18", only "18" is returned—the "16" alias silently disappears.
src/config/config_file/mise_toml.rs#L219-L242
mise/src/config/config_file/mise_toml.rs
Lines 219 to 242 in 3445ea1
- Rename alias directory/module to tool_alias - Rename Alias* structs to ToolAlias* - Add shell-alias command for managing shell aliases - Add set_shell_alias/remove_shell_alias methods to MiseToml - Update examples to use new command names
|
bugbot run |
- Add shellAliasGenerator that runs 'mise shell-alias ls' - Rename shell-alias args from 'alias' to 'shell_alias' to avoid conflicting with tool alias generator - Update addCustomGenerators to add generators for matching arg names that don't have them - Regenerate completions with correct shell alias completions
Hyperfine Performance
|
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 x -- echo |
20.6 ± 0.5 | 19.5 | 24.1 | 1.00 |
mise x -- echo |
21.0 ± 0.9 | 19.8 | 29.5 | 1.02 ± 0.05 |
mise env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 env |
19.7 ± 0.4 | 18.9 | 22.3 | 1.00 |
mise env |
20.3 ± 0.5 | 19.3 | 22.1 | 1.03 ± 0.03 |
mise hook-env
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 hook-env |
19.8 ± 0.4 | 19.0 | 23.1 | 1.00 |
mise hook-env |
20.4 ± 0.4 | 19.4 | 21.7 | 1.03 ± 0.03 |
mise ls
| Command | Mean [ms] | Min [ms] | Max [ms] | Relative |
|---|---|---|---|---|
mise-2025.12.10 ls |
17.5 ± 0.4 | 16.6 | 20.0 | 1.00 |
mise ls |
17.9 ± 0.4 | 16.9 | 19.3 | 1.02 ± 0.03 |
xtasks/test/perf
| Command | mise-2025.12.10 | mise | Variance |
|---|---|---|---|
| install (cached) | 112ms | 111ms | +0% |
| ls (cached) | 68ms | 68ms | +0% |
| bin-paths (cached) | 74ms | 75ms | -1% |
| task-ls (cached) | 282ms | -87% |
|
bugbot run |
### 🚀 Features - **(alias)** rename alias to tool-alias, add shell-alias command by @jdx in [#7357](#7357) - **(upgrade)** display summary of upgraded tools by @jdx in [#7372](#7372) - **(vfox)** embed vfox plugin Lua code in binary by @jdx in [#7369](#7369) ### 🐛 Bug Fixes - **(aqua)** add start_operations for progress reporting by @jdx in [#7354](#7354) - **(github)** improve asset detection for distro-specific and Swift artifacts by @jdx in [#7347](#7347) - **(github)** clean up static_helpers.rs and fix archive bin= option by @jdx in [#7366](#7366) - **(http)** add start_operations for progress reporting by @jdx in [#7355](#7355) - **(lockfile)** place lockfile alongside config file by @jdx in [#7360](#7360) - **(progress)** add start_operations to core plugins by @jdx in [#7351](#7351) - **(ruby-install)** Use ruby_install_bin to update by @calebhearth in [#7350](#7350) - **(rust)** add release_url for rust versions by @jdx in [#7373](#7373) - **(schema)** add `tool_alias`, mark `alias` as deprecated by @SKalt in [#7358](#7358) - **(toolset)** filter tools by OS in list_current_versions by @jdx in [#7356](#7356) - **(ubi)** only show deprecation warning during installation by @jdx in [#7380](#7380) - **(ui)** remove noisy "record size" message during install by @jdx in [#7381](#7381) - update mise-versions URL to use /tools/ prefix by @jdx in [#7378](#7378) ### 🚜 Refactor - **(backend)** unified AssetMatcher with checksum fetching by @jdx in [#7370](#7370) - **(backend)** deprecate ubi backend in favor of github by @jdx in [#7374](#7374) - **(toolset)** decompose mod.rs into smaller modules by @jdx in [#7371](#7371) ### 🧪 Testing - **(e2e)** fix and rename ubi and vfox_embedded_override tests by @jdx in [052ea40](052ea40) ### 📦 Registry - add vfox-gcloud backend for gcloud by @jdx in [#7349](#7349) - convert amplify to use github backend by @jdx in [#7365](#7365) - add github backend for djinni tool by @jdx in [#7363](#7363) - switch glab to native gitlab backend by @jdx in [#7364](#7364) - add s5cmd by @jdx in [#7376](#7376) ### Chore - **(registry)** disable flaky tests for gitu and ktlint by @jdx in [64151cb](64151cb) - resolve clippy warnings and add stricter CI check by @jdx in [#7367](#7367) - suppress dead_code warnings in asset_matcher module by @jdx in [#7377](#7377) ### New Contributors - @calebhearth made their first contribution in [#7350](#7350)
* upstream/main: fix(lockfile): place lockfile alongside config file (jdx#7360) feat(alias): rename alias to tool-alias, add shell-alias command (jdx#7357) fix(aqua): add start_operations for progress reporting (jdx#7354) fix(schema): add `tool_alias`, mark `alias` as deprecated (jdx#7358) fix(progress): add start_operations to core plugins (jdx#7351) fix(toolset): filter tools by OS in list_current_versions (jdx#7356) registry: add vfox-gcloud backend for gcloud (jdx#7349) fix(github): improve asset detection for distro-specific and Swift artifacts (jdx#7347)
Summary
Fixes #7353
mise aliascommand tomise tool-alias(keepingaliasandaliasesas hidden aliases for backwards compatibility)aliasmodule/directory totool_aliasandAlias*structs toToolAlias*set_alias/set_backend_aliasto write to[tool_alias]config section instead of deprecated[alias]remove_alias/remove_backend_aliasto check both[tool_alias]and[alias]sections for removalshell-aliascommand for managing shell aliases ([shell_alias]config section)mise shell-alias ls- list shell aliasesmise shell-alias get <alias>- show command for an aliasmise shell-alias set <alias> <command>- add/update a shell aliasmise shell-alias unset <alias>- remove a shell aliasmise shell-alias lsinstead ofmise alias ls)This ensures that when users run
mise alias set node lts 20.0.0, the config is written to[tool_alias.node.versions]instead of[alias.node], aligning with the deprecation guidance.Test plan
mise tool-alias set node lts 20.0.0writes to[tool_alias]sectionmise alias set node lts 20.0.0still works (backwards compat)mise shell-alias set ll "ls -la"creates shell alias🤖 Generated with Claude Code
Note
Renames
aliastotool-alias, addsshell-aliasmanagement, and updates config/docs/completions to use[tool_alias]and[shell_alias].mise alias→mise tool-alias(keepsalias/aliasesas hidden aliases).mise shell-aliascommand withls/get/set/unsetsubcommands.[tool_alias](instead of deprecated[alias]).[tool_alias]and[alias].[shell_alias].aliasmodule →tool_alias; renameAlias*→ToolAlias*; wire intoCommands.mise.usage.kdl, andmanto reflecttool-aliasand newshell-aliaspages.docs/cli/alias*pages; adddocs/cli/tool-alias*anddocs/cli/shell-alias*.shellAliasGenerator, switch totool-alias, auto-adddebounce, and fix shell-alias completions.cli_commands.tsupdated withtool-aliasandshell-alias.Written by Cursor Bugbot for commit d964353. This will update automatically on new commits. Configure here.