From f5a2a810ed0a2a4dfaa114a533e00c2861e489cd Mon Sep 17 00:00:00 2001 From: atkei Date: Tue, 17 Mar 2026 18:58:53 +0900 Subject: [PATCH 1/4] Migrate from asdf to mise for tool version management Co-Authored-By: Claude Opus 4.6 --- .zprofile | 9 ++++----- .zshrc | 16 +++++----------- bootstrap/asdf.sh | 17 ----------------- bootstrap/bootstrap.sh | 2 +- bootstrap/mise.sh | 16 ++++++++++++++++ 5 files changed, 26 insertions(+), 34 deletions(-) delete mode 100755 bootstrap/asdf.sh create mode 100755 bootstrap/mise.sh diff --git a/.zprofile b/.zprofile index 461423b..f5596fe 100644 --- a/.zprofile +++ b/.zprofile @@ -33,11 +33,10 @@ fi # Android tools export PATH=$PATH:"$HOME/Android/Sdk/platform-tools" -# asdf completion -# https://asdf-vm.com/guide/getting-started.html -if [[ -s $HOME/.asdf/asdf.sh ]]; then - . "$HOME/.asdf/asdf.sh" - fpath=(${ASDF_DIR}/completions $fpath) +# mise (shims for non-interactive shells and IDEs) +# https://mise.jdx.dev/dev-tools/shims.html +if command -v mise &> /dev/null; then + eval "$(mise activate zsh --shims)" fi if [[ -f /opt/homebrew/bin/brew ]]; then diff --git a/.zshrc b/.zshrc index 0834dcb..94fbce0 100644 --- a/.zshrc +++ b/.zshrc @@ -108,17 +108,11 @@ fi # Pulumi completion [ $commands[pulumi] ] && source <(pulumi gen-completion zsh) -# JAVA_HOME (asdf) -[ -s ~/.asdf/plugins/java/set-java-home.zsh ] && . ~/.asdf/plugins/java/set-java-home.zsh - -# FLUTTER_ROOT (asdf) -[[ $(asdf where flutter 2> /dev/null) ]] && export FLUTTER_ROOT="$(asdf where flutter)" - -# AWS CLI completion (asdf) -[ -s $HOME/.asdf/shims/aws_completer ] && complete -C '$HOME/.asdf/shims/aws_completer' aws - -# Terraform completion (asdf) -[ -s $HOME/.asdf/shims/terraform ] && complete -o nospace -C "$HOME/.asdf/shims/terraform" terraform +# mise +# https://mise.jdx.dev/ +if command -v mise &> /dev/null; then + eval "$(mise activate zsh)" +fi # Azure CLI completion if [[ -f "$HOME/.azure/az.completion" ]] then; diff --git a/bootstrap/asdf.sh b/bootstrap/asdf.sh deleted file mode 100755 index d1eba47..0000000 --- a/bootstrap/asdf.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -set -e - -# asdf -# https://asdf-vm.com/ - -if [ -d "${HOME}/.asdf" ]; then - echo asdf is already installed. - exit 0 -fi - -echo Install asdf. - -git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0 - -exit 0 diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh index 7b2216a..5973008 100755 --- a/bootstrap/bootstrap.sh +++ b/bootstrap/bootstrap.sh @@ -32,7 +32,7 @@ fi task "Install prezto" "prezto.sh" task "Install Tmux Plugin Manager" "tpm.sh" task "Install fzf" "fzf.sh" -task "Install asdf" "asdf.sh" +task "Install mise" "mise.sh" task "Install rulesync" "rulesync.sh" if [ "$(uname)" == "Linux" ]; then diff --git a/bootstrap/mise.sh b/bootstrap/mise.sh new file mode 100755 index 0000000..d9d65ac --- /dev/null +++ b/bootstrap/mise.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -e + +# mise +# https://mise.jdx.dev/ + +if command -v mise &> /dev/null; then + echo mise is already installed. + exit 0 +fi + +echo Install mise. + +curl https://mise.run | sh + +exit 0 From 8538599ad34698a8c80eb8c271955fc11b0d85c8 Mon Sep 17 00:00:00 2001 From: atkei Date: Tue, 17 Mar 2026 19:29:29 +0900 Subject: [PATCH 2/4] Use recommended package managers for mise installation - macOS: Homebrew via .Brewfile - Ubuntu: apt repository via bootstrap/mise.sh (same pattern as docker.sh) Co-Authored-By: Claude Opus 4.6 --- .Brewfile | 1 + bootstrap/bootstrap.sh | 2 +- bootstrap/mise.sh | 13 ++++++++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.Brewfile b/.Brewfile index 031b9b8..156744d 100644 --- a/.Brewfile +++ b/.Brewfile @@ -11,4 +11,5 @@ brew "wget" brew "cockroachdb/tap/cockroach" brew "mongodb/brew/mongodb-database-tools" brew "supabase/tap/supabase" +brew "mise" cask "codex" diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh index 5973008..068376d 100755 --- a/bootstrap/bootstrap.sh +++ b/bootstrap/bootstrap.sh @@ -32,10 +32,10 @@ fi task "Install prezto" "prezto.sh" task "Install Tmux Plugin Manager" "tpm.sh" task "Install fzf" "fzf.sh" -task "Install mise" "mise.sh" task "Install rulesync" "rulesync.sh" if [ "$(uname)" == "Linux" ]; then + task "Install mise" "mise.sh" task "Install Docker" "docker.sh" task "Install Azure CLI" "az.sh" task "Install Supabase CLI" "supabase.sh" diff --git a/bootstrap/mise.sh b/bootstrap/mise.sh index d9d65ac..690b1c5 100755 --- a/bootstrap/mise.sh +++ b/bootstrap/mise.sh @@ -1,16 +1,19 @@ #!/usr/bin/env bash + set -e -# mise -# https://mise.jdx.dev/ +# https://mise.jdx.dev/installing-mise.html -if command -v mise &> /dev/null; then +if [ $(command -v mise) ]; then echo mise is already installed. exit 0 fi -echo Install mise. +sudo install -dm 755 /etc/apt/keyrings +wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null +echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=$(dpkg --print-architecture)] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list -curl https://mise.run | sh +sudo apt-get -y update +sudo apt-get -y install mise exit 0 From 8e383a8026fcb52a59e85bd8e2b047d521009f60 Mon Sep 17 00:00:00 2001 From: atkei Date: Tue, 17 Mar 2026 19:36:03 +0900 Subject: [PATCH 3/4] Limit mise shell activation to Linux only Homebrew auto-activates mise on macOS, so explicit activation is only needed for apt-installed mise on Linux. Co-Authored-By: Claude Opus 4.6 --- .zshrc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 94fbce0..ec9459c 100644 --- a/.zshrc +++ b/.zshrc @@ -108,10 +108,11 @@ fi # Pulumi completion [ $commands[pulumi] ] && source <(pulumi gen-completion zsh) -# mise +# mise (Linux only; Homebrew auto-activates on macOS) # https://mise.jdx.dev/ -if command -v mise &> /dev/null; then +if [[ "$(uname)" == "Linux" ]] && command -v mise &> /dev/null; then eval "$(mise activate zsh)" + eval "$(mise completion zsh)" fi # Azure CLI completion From ba40ec37545f3754bb9cb730837695b707ee12b5 Mon Sep 17 00:00:00 2001 From: atkei Date: Tue, 17 Mar 2026 21:08:50 +0900 Subject: [PATCH 4/4] Add mise idiomatic version file configuration to bootstrap Co-Authored-By: Claude Opus 4.6 --- bootstrap/bootstrap.sh | 2 +- bootstrap/mise.sh | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/bootstrap/bootstrap.sh b/bootstrap/bootstrap.sh index 068376d..99d5a92 100755 --- a/bootstrap/bootstrap.sh +++ b/bootstrap/bootstrap.sh @@ -33,9 +33,9 @@ task "Install prezto" "prezto.sh" task "Install Tmux Plugin Manager" "tpm.sh" task "Install fzf" "fzf.sh" task "Install rulesync" "rulesync.sh" +task "Setup mise" "mise.sh" if [ "$(uname)" == "Linux" ]; then - task "Install mise" "mise.sh" task "Install Docker" "docker.sh" task "Install Azure CLI" "az.sh" task "Install Supabase CLI" "supabase.sh" diff --git a/bootstrap/mise.sh b/bootstrap/mise.sh index 690b1c5..f577411 100755 --- a/bootstrap/mise.sh +++ b/bootstrap/mise.sh @@ -4,16 +4,16 @@ set -e # https://mise.jdx.dev/installing-mise.html -if [ $(command -v mise) ]; then - echo mise is already installed. - exit 0 +# Install (Linux only) +if [ "$(uname)" == "Linux" ] && ! command -v mise &> /dev/null; then + sudo install -dm 755 /etc/apt/keyrings + wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null + echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=$(dpkg --print-architecture)] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list + sudo apt-get -y update + sudo apt-get -y install mise fi -sudo install -dm 755 /etc/apt/keyrings -wget -qO - https://mise.jdx.dev/gpg-key.pub | gpg --dearmor | sudo tee /etc/apt/keyrings/mise-archive-keyring.gpg 1> /dev/null -echo "deb [signed-by=/etc/apt/keyrings/mise-archive-keyring.gpg arch=$(dpkg --print-architecture)] https://mise.jdx.dev/deb stable main" | sudo tee /etc/apt/sources.list.d/mise.list - -sudo apt-get -y update -sudo apt-get -y install mise +# Configure +mise settings set idiomatic_version_file_enable_tools '["node"]' exit 0