docs/shell-aliases.md
Define project shortcuts for an interactive Bash, Zsh, or Fish shell with
mise activate. mise sets the aliases as
you enter a directory and removes them when they are no longer configured.
For commands that also need to work in scripts and CI, define tasks.
Shell aliases are not available inside tasks or through mise exec.
Shell aliases are defined in mise.toml under the [shell_alias] section:
[shell_alias]
ll = "ls -la"
la = "ls -A"
gs = "git status"
gc = "git commit"
When you enter a directory with this configuration, these aliases are automatically set in your shell. When you leave the directory (and the new directory doesn't define the same aliases), they are unset.
Shell aliases are currently supported in:
alias/unalias commandsalias/unalias commandsalias/functions -e commandsOther shells (nushell, elvish, xonsh, powershell) do not currently support shell aliases.
Shell aliases work similarly to environment variables managed by mise:
cd into a directory with [shell_alias] config, the aliases are set$ cd ~/myproject
# mise sets: alias ll='ls -la'
$ ll
# Runs: ls -la
$ cd ~
# mise runs: unalias ll
Like other mise config, shell aliases from parent directories are available in child directories. A child directory can override a parent's alias:
[shell_alias]
build = "make build"
[shell_alias]
build = "npm run build" # Overrides parent
Alias values support templates. This Bash/Zsh example quotes the
project path for the shell and runs node --version when you invoke the alias:
[shell_alias]
proj = "cd {{config_root | quote}}"
node_version = "node --version"
Define shortcuts that only make sense within a specific project:
[shell_alias]
dev = "npm run dev"
test = "npm test"
build = "npm run build"
deploy = "./scripts/deploy.sh"
Create aliases that wrap tools with project-specific defaults:
[shell_alias]
docker-compose = "docker compose -f docker-compose.dev.yml"
terraform = "terraform -chdir=./infrastructure"
Quote project paths so directories containing spaces work in Bash and Zsh:
[shell_alias]
src = "cd {{config_root | quote}}/src"
tests = "cd {{config_root | quote}}/tests"
docs = "cd {{config_root | quote}}/docs"
mise activate is running. They are not available inside TOML task run blocks or file tasks, since tasks run in non-interactive subshells. Use the underlying command directly in tasks, or add wrapper scripts to your PATH via env._.path.mise has two alias features that serve different purposes:
| Feature | Purpose | Config Key |
|---|---|---|
| Shell Aliases | Define shell command shortcuts (alias ll='ls -la') | [shell_alias] |
| Tool Aliases | Define version aliases for tools (node@my-version → 24) | [tool_alias] |
See Tool Aliases for documentation on aliasing tool versions.