From caba8c29f7dee7f169868a7af1b96974ee8c4605 Mon Sep 17 00:00:00 2001 From: Lachlan Donald Date: Fri, 13 Feb 2026 08:41:45 +1100 Subject: [PATCH] chore: remove hermit package manager Hermit managed go, pre-commit, and shellcheck via ~/bin and .dotfiles/bin/ symlinks. The ~/bin PATH entry was causing conflicts with mise path ordering. Removed: - hermit/ directory and install script - .hermit/ go package config - All hermit-managed bin/ symlinks and scripts - HERMIT_ENV PATH guard in zsh/main.zsh - ~/bin from PATH - Hermit prompt indicators (starship + geometry plugin) - VS Code terminal hermit env var overrides - .hermit/ from global gitignore - bin/ exclusions from pre-commit config Amp-Thread-ID: https://ampcode.com/threads/T-019c53ca-b47d-722b-8df0-e61924de9301 --- .pre-commit-config.yaml | 4 ++-- bin/.go-1.25.1.pkg | 1 - bin/.pre-commit-4.3.0.pkg | 1 - bin/.shellcheck-0.11.0.pkg | 1 - bin/README.hermit.md | 7 ------- bin/activate-hermit | 21 ------------------- bin/activate-hermit.fish | 24 --------------------- bin/go | 1 - bin/gofmt | 1 - bin/hermit | 43 -------------------------------------- bin/hermit.hcl | 2 -- bin/pre-commit | 1 - bin/shellcheck | 1 - git/gitignore.symlink | 1 - hermit/hermit.hcl.symlink | 1 - hermit/install.sh | 27 ------------------------ task/completion.zsh | 1 - vscode/settings.json | 8 ------- zsh/main.zsh | 19 +++++++---------- zsh/plugins.zsh | 8 ------- zsh/starship.toml | 7 ------- 21 files changed, 10 insertions(+), 170 deletions(-) delete mode 120000 bin/.go-1.25.1.pkg delete mode 120000 bin/.pre-commit-4.3.0.pkg delete mode 120000 bin/.shellcheck-0.11.0.pkg delete mode 100644 bin/README.hermit.md delete mode 100755 bin/activate-hermit delete mode 100755 bin/activate-hermit.fish delete mode 120000 bin/go delete mode 120000 bin/gofmt delete mode 100755 bin/hermit delete mode 100644 bin/hermit.hcl delete mode 120000 bin/pre-commit delete mode 120000 bin/shellcheck delete mode 100644 hermit/hermit.hcl.symlink delete mode 100644 hermit/install.sh diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a02037e..2eeab96 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,14 +7,14 @@ repos: hooks: - id: shellcheck args: ["--severity=warning"] - exclude: '(\.zsh$|^bin/)' # Exclude zsh files and hermit-managed bin/ + exclude: '\.zsh$' - repo: https://github.com/scop/pre-commit-shfmt rev: v3.10.0-2 hooks: - id: shfmt args: ["-i", "2", "-ci", "-bn", "-s"] - exclude: '(\.zsh$|^bin/)' # Exclude zsh files and hermit-managed bin/ + exclude: '\.zsh$' # -i 2: indent with 2 spaces # -ci: indent case statements # -bn: binary operators like && and | may start a line diff --git a/bin/.go-1.25.1.pkg b/bin/.go-1.25.1.pkg deleted file mode 120000 index 383f451..0000000 --- a/bin/.go-1.25.1.pkg +++ /dev/null @@ -1 +0,0 @@ -hermit \ No newline at end of file diff --git a/bin/.pre-commit-4.3.0.pkg b/bin/.pre-commit-4.3.0.pkg deleted file mode 120000 index 383f451..0000000 --- a/bin/.pre-commit-4.3.0.pkg +++ /dev/null @@ -1 +0,0 @@ -hermit \ No newline at end of file diff --git a/bin/.shellcheck-0.11.0.pkg b/bin/.shellcheck-0.11.0.pkg deleted file mode 120000 index 383f451..0000000 --- a/bin/.shellcheck-0.11.0.pkg +++ /dev/null @@ -1 +0,0 @@ -hermit \ No newline at end of file diff --git a/bin/README.hermit.md b/bin/README.hermit.md deleted file mode 100644 index e889550..0000000 --- a/bin/README.hermit.md +++ /dev/null @@ -1,7 +0,0 @@ -# Hermit environment - -This is a [Hermit](https://github.com/cashapp/hermit) bin directory. - -The symlinks in this directory are managed by Hermit and will automatically -download and install Hermit itself as well as packages. These packages are -local to this environment. diff --git a/bin/activate-hermit b/bin/activate-hermit deleted file mode 100755 index fe28214..0000000 --- a/bin/activate-hermit +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash -# This file must be used with "source bin/activate-hermit" from bash or zsh. -# You cannot run it directly -# -# THIS FILE IS GENERATED; DO NOT MODIFY - -if [ "${BASH_SOURCE-}" = "$0" ]; then - echo "You must source this script: \$ source $0" >&2 - exit 33 -fi - -BIN_DIR="$(dirname "${BASH_SOURCE[0]:-${(%):-%x}}")" -if "${BIN_DIR}/hermit" noop > /dev/null; then - eval "$("${BIN_DIR}/hermit" activate "${BIN_DIR}/..")" - - if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ]; then - hash -r 2>/dev/null - fi - - echo "Hermit environment $("${HERMIT_ENV}"/bin/hermit env HERMIT_ENV) activated" -fi diff --git a/bin/activate-hermit.fish b/bin/activate-hermit.fish deleted file mode 100755 index 0367d23..0000000 --- a/bin/activate-hermit.fish +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env fish - -# This file must be sourced with "source bin/activate-hermit.fish" from Fish shell. -# You cannot run it directly. -# -# THIS FILE IS GENERATED; DO NOT MODIFY - -if status is-interactive - set BIN_DIR (dirname (status --current-filename)) - - if "$BIN_DIR/hermit" noop > /dev/null - # Source the activation script generated by Hermit - "$BIN_DIR/hermit" activate "$BIN_DIR/.." | source - - # Clear the command cache if applicable - functions -c > /dev/null 2>&1 - - # Display activation message - echo "Hermit environment $($HERMIT_ENV/bin/hermit env HERMIT_ENV) activated" - end -else - echo "You must source this script: source $argv[0]" >&2 - exit 33 -end diff --git a/bin/go b/bin/go deleted file mode 120000 index eea5fe7..0000000 --- a/bin/go +++ /dev/null @@ -1 +0,0 @@ -.go-1.25.1.pkg \ No newline at end of file diff --git a/bin/gofmt b/bin/gofmt deleted file mode 120000 index eea5fe7..0000000 --- a/bin/gofmt +++ /dev/null @@ -1 +0,0 @@ -.go-1.25.1.pkg \ No newline at end of file diff --git a/bin/hermit b/bin/hermit deleted file mode 100755 index 31559b7..0000000 --- a/bin/hermit +++ /dev/null @@ -1,43 +0,0 @@ -#!/bin/bash -# -# THIS FILE IS GENERATED; DO NOT MODIFY - -set -eo pipefail - -export HERMIT_USER_HOME=~ - -if [ -z "${HERMIT_STATE_DIR}" ]; then - case "$(uname -s)" in - Darwin) - export HERMIT_STATE_DIR="${HERMIT_USER_HOME}/Library/Caches/hermit" - ;; - Linux) - export HERMIT_STATE_DIR="${XDG_CACHE_HOME:-${HERMIT_USER_HOME}/.cache}/hermit" - ;; - esac -fi - -export HERMIT_DIST_URL="${HERMIT_DIST_URL:-https://github.com/cashapp/hermit/releases/download/stable}" -HERMIT_CHANNEL="$(basename "${HERMIT_DIST_URL}")" -export HERMIT_CHANNEL -export HERMIT_EXE=${HERMIT_EXE:-${HERMIT_STATE_DIR}/pkg/hermit@${HERMIT_CHANNEL}/hermit} - -if [ ! -x "${HERMIT_EXE}" ]; then - echo "Bootstrapping ${HERMIT_EXE} from ${HERMIT_DIST_URL}" 1>&2 - INSTALL_SCRIPT="$(mktemp)" - # This value must match that of the install script - INSTALL_SCRIPT_SHA256="09ed936378857886fd4a7a4878c0f0c7e3d839883f39ca8b4f2f242e3126e1c6" - if [ "${INSTALL_SCRIPT_SHA256}" = "BYPASS" ]; then - curl -fsSL "${HERMIT_DIST_URL}/install.sh" -o "${INSTALL_SCRIPT}" - else - # Install script is versioned by its sha256sum value - curl -fsSL "${HERMIT_DIST_URL}/install-${INSTALL_SCRIPT_SHA256}.sh" -o "${INSTALL_SCRIPT}" - # Verify install script's sha256sum - openssl dgst -sha256 "${INSTALL_SCRIPT}" | \ - awk -v EXPECTED="$INSTALL_SCRIPT_SHA256" \ - '$2!=EXPECTED {print "Install script sha256 " $2 " does not match " EXPECTED; exit 1}' - fi - /bin/bash "${INSTALL_SCRIPT}" 1>&2 -fi - -exec "${HERMIT_EXE}" --level=fatal exec "$0" -- "$@" diff --git a/bin/hermit.hcl b/bin/hermit.hcl deleted file mode 100644 index 081cbe8..0000000 --- a/bin/hermit.hcl +++ /dev/null @@ -1,2 +0,0 @@ -github-token-auth { -} diff --git a/bin/pre-commit b/bin/pre-commit deleted file mode 120000 index a9c6be4..0000000 --- a/bin/pre-commit +++ /dev/null @@ -1 +0,0 @@ -.pre-commit-4.3.0.pkg \ No newline at end of file diff --git a/bin/shellcheck b/bin/shellcheck deleted file mode 120000 index 3b905a9..0000000 --- a/bin/shellcheck +++ /dev/null @@ -1 +0,0 @@ -.shellcheck-0.11.0.pkg \ No newline at end of file diff --git a/git/gitignore.symlink b/git/gitignore.symlink index ba63892..27100d4 100644 --- a/git/gitignore.symlink +++ b/git/gitignore.symlink @@ -4,7 +4,6 @@ .envrc .vscode/ .vagrant/ -.hermit/ .repl-history .aider* .ck/ diff --git a/hermit/hermit.hcl.symlink b/hermit/hermit.hcl.symlink deleted file mode 100644 index edcc701..0000000 --- a/hermit/hermit.hcl.symlink +++ /dev/null @@ -1 +0,0 @@ -prompt = none diff --git a/hermit/install.sh b/hermit/install.sh deleted file mode 100644 index 36b3a77..0000000 --- a/hermit/install.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -set -euo pipefail - -if command -v brew &> /dev/null; then - if brew list | grep -q "hermit"; then - echo "Removing hermit from homebrew..." - brew uninstall hermit - fi -fi - -if [ ! -f "$HOME/bin/hermit" ]; then - # Remove any existing hermit installations - for dir in /opt/homebrew/bin /usr/local/bin; do - if [ -f "$dir/hermit" ] || [ -L "$dir/hermit" ]; then - echo "Removing existing hermit from $dir..." - rm -f "$dir/hermit" "$dir/hermit-stable" - fi - done - - export HERMIT_BIN_INSTALL_DIR="$HOME/bin" - curl -fsSL https://github.com/cashapp/hermit/releases/download/stable/install.sh | /bin/bash -fi - -# Install Go via hermit for use by other installers (e.g., wtp) -if [ ! -f "$DOTFILES/bin/go" ]; then - "$DOTFILES/bin/hermit" install go -fi diff --git a/task/completion.zsh b/task/completion.zsh index c23f140..1bee4e8 100644 --- a/task/completion.zsh +++ b/task/completion.zsh @@ -1,7 +1,6 @@ #!/usr/bin/env zsh # task completion - loads after compinit -# Works with hermit-managed task installations if command -v task >/dev/null 2>&1; then eval "$(task --completion zsh 2>/dev/null)" fi diff --git a/vscode/settings.json b/vscode/settings.json index 9b49c7f..028092b 100644 --- a/vscode/settings.json +++ b/vscode/settings.json @@ -16,14 +16,6 @@ //-------------------------------------------------- "terminal.integrated.fontFamily": "'SauceCodePro Nerd Font Mono'", - // https://cashapp.github.io/hermit/usage/ide/#visual-studio-code-terminal - "terminal.integrated.env.osx": { - "ACTIVE_HERMIT": null, - "HERMIT_ENV": null, - "HERMIT_ENV_OPS": null, - "HERMIT_BIN": null - }, - //-------------------------------------------------- // Language-specific Settings //-------------------------------------------------- diff --git a/zsh/main.zsh b/zsh/main.zsh index b1efd8a..c6c23a2 100644 --- a/zsh/main.zsh +++ b/zsh/main.zsh @@ -13,17 +13,14 @@ config_files=(${config_files:#$DOTFILES/zsh/main.zsh}) # On how to set PATH in macOS: # https://gist.github.com/Linerre/f11ad4a6a934dcf01ee8415c9457e7b2 -# Only set up PATH if we're not in a Hermit environment -if [[ -z "$HERMIT_ENV" ]]; then - # remove duplicate entries from $PATH - typeset -U PATH path - path=("$HOME/bin" "$DOTFILES/bin" "$HOME/.local/bin" $path "/opt/homebrew/sbin" "/opt/homebrew/bin" "$HOME/.cargo/bin") - - # load the path files - for file in ${(M)config_files:#*/path.zsh} ; do - source $file - done -fi +# remove duplicate entries from $PATH +typeset -U PATH path +path=("$DOTFILES/bin" "$HOME/.local/bin" $path "/opt/homebrew/sbin" "/opt/homebrew/bin" "$HOME/.cargo/bin") + +# load the path files +for file in ${(M)config_files:#*/path.zsh} ; do + source $file +done # Lazy-load antidote and generate the static load file only when needed zsh_plugins=${ZDOTDIR:-$HOME}/.zsh_plugins diff --git a/zsh/plugins.zsh b/zsh/plugins.zsh index 8008c8c..1a66007 100644 --- a/zsh/plugins.zsh +++ b/zsh/plugins.zsh @@ -51,14 +51,6 @@ geometry_rosetta2() { echo "${GEOMETRY_GIT_SEPARATOR} rosetta2" } -# hermit -# A geometry plugin for showing the hermit session that is active - -geometry_hermit() { - [ -n "${HERMIT_ENV:-}" ] || return - echo "${GEOMETRY_GIT_SEPARATOR} 🐚" -} - geometry_firebase() { local firebase_dir=$(get_firebase_dir) [ -n "${firebase_dir}" ] || return diff --git a/zsh/starship.toml b/zsh/starship.toml index d727468..3129ba8 100644 --- a/zsh/starship.toml +++ b/zsh/starship.toml @@ -12,7 +12,6 @@ $all\ $jobs\ $status\ $memory_usage\ -$custom_hermit\ $custom_firebase\ $kubernetes\ $time\ @@ -51,12 +50,6 @@ ahead = '⇡${count}' diverged = '⇕⇡${ahead_count}⇣${behind_count}' behind = '⇣${count}' -[custom.hermit] -symbol = '🦀' -style = 'bold yellow' -format = 'in [$symbol]($style) ' -when = ''' test -n "$HERMIT_ENV" ''' - [custom.firebase] command = 'zsh -ic "geometry_firebase"' symbol = '🔥 '