chore(mise): update configs and add cleanup script documentation

Update tooling configs, shell settings, and editor configurations
as part of the mise migration. Add companion documentation for the
cleanup-old-version-managers script and remove unused fish completions.
This commit is contained in:
2026-03-18 08:43:32 +02:00
parent d5e692e997
commit df84f1dc0e
17 changed files with 82 additions and 35 deletions

View File

@@ -7,6 +7,7 @@
"Exclude": [ "Exclude": [
"base/plan", "base/plan",
"config/fish/completions/.*", "config/fish/completions/.*",
"config/karabiner/.*",
"config/fish/conf.d/.*", "config/fish/conf.d/.*",
"config/fish/functions/.*", "config/fish/functions/.*",
"config/fzf/key-bindings.fish", "config/fzf/key-bindings.fish",

2
.gitignore vendored
View File

@@ -25,6 +25,8 @@ config/alacritty/theme-active.toml
config/cheat/cheatsheets/pure-bash-bible/* config/cheat/cheatsheets/pure-bash-bible/*
config/cheat/cheatsheets/tldr/* config/cheat/cheatsheets/tldr/*
config/fish/completions/asdf.fish config/fish/completions/asdf.fish
config/fish/completions/kubectl.fish
config/fish/completions/orbctl.fish
config/fish/fish_variables config/fish/fish_variables
config/fish/fish_variables.* config/fish/fish_variables.*
config/gh/hosts.yml config/gh/hosts.yml

View File

@@ -172,7 +172,9 @@ Yarn (v4.12.0) is the package manager. Do not use npm.
# context-mode — MANDATORY routing rules # context-mode — MANDATORY routing rules
You have context-mode MCP tools available. These rules are NOT optional — they protect your context window from flooding. A single unrouted command can dump 56 KB into context and waste the entire session. You have context-mode MCP tools available. These rules are NOT optional —
they protect your context window from flooding.
A single unrouted command can dump 56 KB into context and waste the entire session.
## BLOCKED commands — do NOT attempt these ## BLOCKED commands — do NOT attempt these
@@ -183,7 +185,9 @@ Instead use:
- `ctx_execute(language: "javascript", code: "const r = await fetch(...)")` to run HTTP calls in sandbox - `ctx_execute(language: "javascript", code: "const r = await fetch(...)")` to run HTTP calls in sandbox
### Inline HTTP — BLOCKED ### Inline HTTP — BLOCKED
Any Bash command containing `fetch('http`, `requests.get(`, `requests.post(`, `http.get(`, or `http.request(` is intercepted and replaced with an error message. Do NOT retry with Bash. Any Bash command containing `fetch('http`, `requests.get(`, `requests.post(`,
`http.get(`, or `http.request(` is intercepted and replaced with an error message.
Do NOT retry with Bash.
Instead use: Instead use:
- `ctx_execute(language, code)` to run HTTP calls in sandbox — only stdout enters context - `ctx_execute(language, code)` to run HTTP calls in sandbox — only stdout enters context
@@ -202,33 +206,49 @@ For everything else, use:
### Read (for analysis) ### Read (for analysis)
If you are reading a file to **Edit** it → Read is correct (Edit needs content in context). If you are reading a file to **Edit** it → Read is correct (Edit needs content in context).
If you are reading to **analyze, explore, or summarize** use `ctx_execute_file(path, language, code)` instead. Only your printed summary enters context. The raw file content stays in the sandbox. If you are reading to **analyze, explore, or summarize**
use `ctx_execute_file(path, language, code)` instead.
Only your printed summary enters context. The raw file content stays in the sandbox.
### Grep (large results) ### Grep (large results)
Grep results can flood context. Use `ctx_execute(language: "shell", code: "grep ...")` to run searches in sandbox. Only your printed summary enters context. Grep results can flood context.
Use `ctx_execute(language: "shell", code: "grep ...")` to run searches in sandbox.
Only your printed summary enters context.
## Tool selection hierarchy ## Tool selection hierarchy
1. **GATHER**: `ctx_batch_execute(commands, queries)` — Primary tool. Runs all commands, auto-indexes output, returns search results. ONE call replaces 30+ individual calls. 1. **GATHER**: `ctx_batch_execute(commands, queries)` — Primary tool.
2. **FOLLOW-UP**: `ctx_search(queries: ["q1", "q2", ...])` — Query indexed content. Pass ALL questions as array in ONE call. Runs all commands, auto-indexes output, returns search results.
3. **PROCESSING**: `ctx_execute(language, code)` | `ctx_execute_file(path, language, code)` — Sandbox execution. Only stdout enters context. ONE call replaces 30+ individual calls.
4. **WEB**: `ctx_fetch_and_index(url, source)` then `ctx_search(queries)` — Fetch, chunk, index, query. Raw HTML never enters context. 2. **FOLLOW-UP**: `ctx_search(queries: ["q1", "q2", ...])`
5. **INDEX**: `ctx_index(content, source)` — Store content in FTS5 knowledge base for later search. Query indexed content. Pass ALL questions as array in ONE call.
3. **PROCESSING**: `ctx_execute(language, code)` |
`ctx_execute_file(path, language, code)`
Sandbox execution. Only stdout enters context.
4. **WEB**: `ctx_fetch_and_index(url, source)` then
`ctx_search(queries)` — Fetch, chunk, index, query.
Raw HTML never enters context.
5. **INDEX**: `ctx_index(content, source)`
Store content in FTS5 knowledge base for later search.
## Subagent routing ## Subagent routing
When spawning subagents (Agent/Task tool), the routing block is automatically injected into their prompt. Bash-type subagents are upgraded to general-purpose so they have access to MCP tools. You do NOT need to manually instruct subagents about context-mode. When spawning subagents (Agent/Task tool), the routing block is automatically
injected into their prompt. Bash-type subagents are upgraded to general-purpose
so they have access to MCP tools.
You do NOT need to manually instruct subagents about context-mode.
## Output constraints ## Output constraints
- Keep responses under 500 words. - Keep responses under 500 words.
- Write artifacts (code, configs, PRDs) to FILES — never return them as inline text. Return only: file path + 1-line description. - Write artifacts (code, configs, PRDs) to FILES — never return them
as inline text. Return only: file path + 1-line description.
- When indexing content, use descriptive source labels so others can `ctx_search(source: "label")` later. - When indexing content, use descriptive source labels so others can `ctx_search(source: "label")` later.
## ctx commands ## ctx commands
| Command | Action | | Command | Action |
|---------|--------| |---------------|---------------------------------------------------------------------------------------|
| `ctx stats` | Call the `ctx_stats` MCP tool and display the full output verbatim | | `ctx stats` | Call the `ctx_stats` MCP tool and display the full output verbatim |
| `ctx doctor` | Call the `ctx_doctor` MCP tool, run the returned shell command, display as checklist | | `ctx doctor` | Call the `ctx_doctor` MCP tool, run the returned shell command, display as checklist |
| `ctx upgrade` | Call the `ctx_upgrade` MCP tool, run the returned shell command, display as checklist | | `ctx upgrade` | Call the `ctx_upgrade` MCP tool, run the returned shell command, display as checklist |

View File

@@ -20,6 +20,7 @@
"!!**/config/op/plugins/used_plugins", "!!**/config/op/plugins/used_plugins",
"!!**/config/tmux/plugins", "!!**/config/tmux/plugins",
"!!**/config/zsh", "!!**/config/zsh",
"!!**/config/karabiner",
"!!**/config/vim", "!!**/config/vim",
"!!**/lazy-lock.json", "!!**/lazy-lock.json",
"!!**/local/bin/antigen.zsh", "!!**/local/bin/antigen.zsh",

View File

@@ -18,7 +18,11 @@
[ -z "${EDITOR:-}" ] && export EDITOR="nvim" [ -z "${EDITOR:-}" ] && export EDITOR="nvim"
[ -z "${VISUAL:-}" ] && export VISUAL="code" [ -z "${VISUAL:-}" ] && export VISUAL="code"
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" # Bootstrap: ensure local/bin is on PATH so x-path is available
PATH="$DOTFILES/local/bin:$PATH"
# Use x-path to deduplicate PATH entries
PATH="$(x-path prepend "$XDG_BIN_HOME" "$DOTFILES/local/bin" "$XDG_DATA_HOME/cargo/bin" "/opt/homebrew/bin" "/usr/local/bin")"
export PATH
if ! command -v msg &> /dev/null; then if ! command -v msg &> /dev/null; then
# Function to print messages if VERBOSE is enabled # Function to print messages if VERBOSE is enabled

View File

@@ -114,9 +114,10 @@ end
# cd to git root directory # cd to git root directory
function cdgr --description 'cd to git root' function cdgr --description 'cd to git root'
if git rev-parse --is-inside-work-tree &>/dev/null if git rev-parse --is-inside-work-tree &>/dev/null
cd (git rev-parse --show-toplevel) cd (git rev-parse --show-toplevel); or return $status
else else
echo >&2 "Not in a git repository" echo >&2 "Not in a git repository"
return 1
end end
end end

View File

@@ -1 +0,0 @@
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/kubectl.fish

View File

@@ -1 +0,0 @@
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/orbctl.fish

View File

@@ -12,7 +12,7 @@ rust = "stable"
"ubi:ClementTsang/bottom" = "latest" "ubi:ClementTsang/bottom" = "latest"
"ubi:ajeetdsouza/zoxide" = "latest" "ubi:ajeetdsouza/zoxide" = "latest"
"ubi:tree-sitter/tree-sitter" = "latest" "ubi:tree-sitter/tree-sitter" = "latest"
"ubi:neovim/neovim" = "latest" "ubi:neovim/neovim" = "latest" # Neovim editor binary
"ubi:dandavison/delta" = "latest" "ubi:dandavison/delta" = "latest"
# Cargo-based tools (no pre-built binary available) # Cargo-based tools (no pre-built binary available)
@@ -32,7 +32,7 @@ rust = "stable"
# npm-based tools # npm-based tools
"npm:editorconfig-checker" = "latest" "npm:editorconfig-checker" = "latest"
"npm:github-release-notes" = "latest" "npm:github-release-notes" = "latest"
"npm:neovim" = "latest" "npm:neovim" = "latest" # Node.js client for Neovim's RPC API (required by plugins)
"npm:corepack" = "latest" "npm:corepack" = "latest"
# Python tools (via pipx backend) # Python tools (via pipx backend)

View File

@@ -102,4 +102,4 @@ function GetIntelephenseLicense()
f:close() f:close()
local stripped = string.gsub(content, '%s+', '') local stripped = string.gsub(content, '%s+', '')
return stripped == '' and nil or stripped return stripped == '' and nil or stripped
end end

View File

@@ -5,7 +5,7 @@
" vint: +ProhibitAbbreviationOption +ProhibitSetNoCompatible " vint: +ProhibitAbbreviationOption +ProhibitSetNoCompatible
" mise — add shims to PATH for tool discovery " mise — add shims to PATH for tool discovery
let $PATH = $HOME . '/.local/share/mise/shims:' . $PATH let $PATH = $HOME . '/.local/bin:' . $HOME . '/.local/share/mise/shims:' . $PATH
"***************************************************************************** "*****************************************************************************
"" Vim-Plug core "" Vim-Plug core
"***************************************************************************** "*****************************************************************************

View File

@@ -61,7 +61,7 @@
vcs # git status vcs # git status
# command_execution_time # previous command duration # command_execution_time # previous command duration
go go
mise asdf
aws aws
# =========================[ Line #2 ]========================= # =========================[ Line #2 ]=========================
newline # \n newline # \n

View File

@@ -22,7 +22,6 @@ dfm.sh
.phpactor.json .phpactor.json
.zsh_history .zsh_history
**/.claude/settings.local.json
**/.claude/* **/.claude/*
**/.serena/* **/.serena/*
**/docs/plans/* **/docs/plans/*

View File

@@ -169,7 +169,7 @@ section_install()
if ! command -v mise &> /dev/null; then if ! command -v mise &> /dev/null; then
msgr nested "Installing mise..." msgr nested "Installing mise..."
curl https://mise.run | sh curl https://mise.run | sh
export PATH="$HOME/.local/bin:$PATH" export PATH="${XDG_BIN_HOME:-$HOME/.local/bin}:$PATH"
fi fi
mise install --yes mise install --yes
mise reshim mise reshim

View File

@@ -0,0 +1,20 @@
# cleanup-old-version-managers
Remove old version manager installations that have been replaced by mise.
## Usage
```bash
scripts/cleanup-old-version-managers.sh [--dry-run]
```
## What it does
1. Removes data directories for nvm, fnm, pyenv, goenv, and bob-nvim.
2. Removes cargo-installed tool binaries now managed by mise.
3. Removes go-installed tool binaries from `$GOPATH/bin`.
4. Uninstalls Homebrew packages replaced by mise (if brew is available).
Mason binaries (`$XDG_DATA_HOME/nvim/mason/`) are not touched.
Pass `--dry-run` to preview what would be removed without making changes.

View File

@@ -13,8 +13,8 @@ remove_dir()
{ {
local dir="$1" local dir="$1"
local label="$2" local label="$2"
if [ -d "$dir" ]; then if [[ -d "$dir" ]]; then
if [ "$DRY_RUN" = "--dry-run" ]; then if [[ "$DRY_RUN" = "--dry-run" ]]; then
msgr warn "[DRY RUN] Would remove $label: $dir" msgr warn "[DRY RUN] Would remove $label: $dir"
else else
msgr run "Removing $label: $dir" msgr run "Removing $label: $dir"
@@ -30,8 +30,8 @@ remove_file()
{ {
local file="$1" local file="$1"
local label="$2" local label="$2"
if [ -f "$file" ]; then if [[ -f "$file" ]]; then
if [ "$DRY_RUN" = "--dry-run" ]; then if [[ "$DRY_RUN" = "--dry-run" ]]; then
msgr warn "[DRY RUN] Would remove $label: $file" msgr warn "[DRY RUN] Would remove $label: $file"
else else
rm -f "$file" rm -f "$file"
@@ -67,7 +67,7 @@ remove_dir "$XDG_DATA_HOME/bob" "bob-nvim data"
CARGO_BIN="${XDG_DATA_HOME}/cargo/bin" CARGO_BIN="${XDG_DATA_HOME}/cargo/bin"
CARGO_MANAGED_TOOLS=( CARGO_MANAGED_TOOLS=(
bkt bottom btm difft difftastic eza fd rg ripgrep bkt btm difft eza fd rg
tree-sitter tmux-sessionizer zoxide bob tree-sitter tmux-sessionizer zoxide bob
cargo-install-update cargo-cache cargo-install-update cargo-cache
) )
@@ -82,7 +82,7 @@ GO_BIN="${XDG_DATA_HOME}/go/bin"
GO_MANAGED_TOOLS=( GO_MANAGED_TOOLS=(
yamlfmt cheat glow fzf gum sesh git-profile yamlfmt cheat glow fzf gum sesh git-profile
) )
if [ "$GO_BIN" != "$XDG_BIN_HOME" ] && [ -d "$GO_BIN" ]; then if [[ "$GO_BIN" != "$XDG_BIN_HOME" ]] && [[ -d "$GO_BIN" ]]; then
for tool in "${GO_MANAGED_TOOLS[@]}"; do for tool in "${GO_MANAGED_TOOLS[@]}"; do
remove_file "$GO_BIN/$tool" "go-installed $tool" remove_file "$GO_BIN/$tool" "go-installed $tool"
done done
@@ -108,11 +108,12 @@ if command -v brew &> /dev/null; then
) )
for pkg in "${BREW_REMOVE[@]}"; do for pkg in "${BREW_REMOVE[@]}"; do
if brew list "$pkg" &> /dev/null; then if brew list "$pkg" &> /dev/null; then
if [ "$DRY_RUN" = "--dry-run" ]; then if [[ "$DRY_RUN" = "--dry-run" ]]; then
msgr warn "[DRY RUN] Would brew uninstall $pkg" msgr warn "[DRY RUN] Would brew uninstall $pkg"
else else
msgr run "Uninstalling brew package: $pkg" msgr run "Uninstalling brew package: $pkg"
brew uninstall --ignore-dependencies "$pkg" || true msgr warn "Note: $pkg may have dependents"
brew uninstall "$pkg" || true
msgr run_done "Uninstalled $pkg" msgr run_done "Uninstalled $pkg"
fi fi
fi fi

View File

@@ -10,7 +10,7 @@ scripts/install-python-packages.sh
## What it does ## What it does
1. Checks that `uv` is available; if missing, installs it via the official installer. 1. Checks that `uv` is available; if missing, exits with an error (install `uv` via mise first).
2. Installs each library from the inline `libraries` array using `uv pip install --system --upgrade`. 2. Installs each library from the inline `libraries` array using `uv pip install --system --upgrade`.
To add or remove packages, edit the `libraries` array in `scripts/install-python-packages.sh`. To add or remove packages, edit the `libraries` array in `scripts/install-python-packages.sh`.