Files
dotfiles/install.d/30-mise.sh
Andrejus b62a6c00f9 chore(install): optimize logging, speed, cleanup
- Version logged after [PASS] (not before) across all scripts
- Pre-cache brew package lists with log_info progress
- Read brew version from git describe cache (skip Ruby startup)
- Batch mise use -g calls (single invocation for all tools)
- Replace mise verify step with mise ls --current
- Parallel vim plugin pulls
- Skip donut compile when binary is fresh
- Pre-check macOS defaults before writing (skip fsync when unchanged)
- Pre-check dock state before dockutil calls
- Remove redundant 'already installed' skip logs
- Remove meetingbar and wispr-flow install scripts
- Renumber scripts to fill gaps

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 18:09:38 +00:00

95 lines
2.9 KiB
Bash
Executable File

#!/usr/bin/env bash
# -----------------------------------------------------------------------------
# Description:
# Install mise runtime manager and all development tools.
# Consolidated installation of Python, Node.js, GitHub CLI, Terraform, Firebase, etc.
#
# Install mise
if ! command -v mise &>/dev/null; then
log_info "Installing mise..."
case "$DOTS_PKG" in
brew)
brew install mise
;;
apt)
# https://mise.jdx.dev/getting-started.html#apt-debian-ubuntu
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=amd64] https://mise.jdx.dev/deb stable main" | \
sudo tee /etc/apt/sources.list.d/mise.list
sudo apt-get update -qq
sudo apt-get install -qq mise
;;
pacman)
yay -S --noconfirm mise
;;
*)
# Fallback: curl install
log_info "Using curl installer..."
curl https://mise.jdx.dev/install.sh | sh
# Add to PATH for current session
export PATH="$HOME/.local/bin:$PATH"
;;
esac
fi
echo "mise $(MISE_QUIET=1 mise --version)" | log_quote
# Skip runtimes in Codespaces (use pre-installed versions)
if [[ "$DOTS_ENV" != "codespaces" ]]; then
typeset -a MISE_RUNTIMES=(
"python@3.14.2"
"node@25.5.0"
"bun@latest"
"rust@latest"
)
log_info "Installing runtimes..."
MISE_QUIET=1 mise install "${MISE_RUNTIMES[@]}" 2>&1 | log_quote
MISE_QUIET=1 mise use -g "${MISE_RUNTIMES[@]}" 2>&1 | log_quote
fi
# Activate mise shims so runtimes (e.g. python3) are available for app installers
eval "$(mise activate bash)"
export PATH="$HOME/.local/share/mise/shims:$PATH"
typeset -a MISE_APPS=(
"bat@latest"
"fzf@latest"
"zoxide@latest"
"ripgrep@latest"
"delta@latest"
)
if [[ "$DOTS_ENV" != "codespaces" ]]; then
MISE_APPS+=(
"poetry@2.3.2"
"gh@2.86.0"
"terraform@1.14.4"
"firebase@15.5.1"
"fastfetch@latest"
"glow@latest"
)
fi
log_info "Installing apps..."
MISE_QUIET=1 mise use -g "${MISE_APPS[@]}" 2>&1 | log_quote
# Rebuild bat theme cache with mise-installed bat (must match delta's syntect version)
bat cache --build &>/dev/null
if [[ "$DOTS_ENV" != "codespaces" ]]; then
# Setup Poetry ZSH completions (XDG compliant)
COMPLETIONS_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/zsh/completions"
mkdir -p "$COMPLETIONS_DIR"
if [ ! -f "$COMPLETIONS_DIR/_poetry" ]; then
mise exec -- poetry completions zsh > "$COMPLETIONS_DIR/_poetry"
fi
fi
log_pass "mise tools installed"
mise ls --current 2>/dev/null | awk '{printf "%s %s\n", $1, $2}' | log_quote