mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-18 10:06:04 +00:00
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:
@@ -7,6 +7,7 @@
|
||||
"Exclude": [
|
||||
"base/plan",
|
||||
"config/fish/completions/.*",
|
||||
"config/karabiner/.*",
|
||||
"config/fish/conf.d/.*",
|
||||
"config/fish/functions/.*",
|
||||
"config/fzf/key-bindings.fish",
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -25,6 +25,8 @@ config/alacritty/theme-active.toml
|
||||
config/cheat/cheatsheets/pure-bash-bible/*
|
||||
config/cheat/cheatsheets/tldr/*
|
||||
config/fish/completions/asdf.fish
|
||||
config/fish/completions/kubectl.fish
|
||||
config/fish/completions/orbctl.fish
|
||||
config/fish/fish_variables
|
||||
config/fish/fish_variables.*
|
||||
config/gh/hosts.yml
|
||||
|
||||
50
CLAUDE.md
50
CLAUDE.md
@@ -172,7 +172,9 @@ Yarn (v4.12.0) is the package manager. Do not use npm.
|
||||
|
||||
# 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
|
||||
|
||||
@@ -183,7 +185,9 @@ Instead use:
|
||||
- `ctx_execute(language: "javascript", code: "const r = await fetch(...)")` to run HTTP calls in sandbox
|
||||
|
||||
### 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:
|
||||
- `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)
|
||||
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 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
|
||||
|
||||
1. **GATHER**: `ctx_batch_execute(commands, queries)` — Primary tool. Runs all commands, auto-indexes output, returns search results. ONE call replaces 30+ individual calls.
|
||||
2. **FOLLOW-UP**: `ctx_search(queries: ["q1", "q2", ...])` — 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.
|
||||
1. **GATHER**: `ctx_batch_execute(commands, queries)` — Primary tool.
|
||||
Runs all commands, auto-indexes output, returns search results.
|
||||
ONE call replaces 30+ individual calls.
|
||||
2. **FOLLOW-UP**: `ctx_search(queries: ["q1", "q2", ...])` —
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
- 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.
|
||||
|
||||
## ctx commands
|
||||
|
||||
| Command | Action |
|
||||
|---------|--------|
|
||||
| `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 |
|
||||
| Command | Action |
|
||||
|---------------|---------------------------------------------------------------------------------------|
|
||||
| `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 upgrade` | Call the `ctx_upgrade` MCP tool, run the returned shell command, display as checklist |
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"!!**/config/op/plugins/used_plugins",
|
||||
"!!**/config/tmux/plugins",
|
||||
"!!**/config/zsh",
|
||||
"!!**/config/karabiner",
|
||||
"!!**/config/vim",
|
||||
"!!**/lazy-lock.json",
|
||||
"!!**/local/bin/antigen.zsh",
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
[ -z "${EDITOR:-}" ] && export EDITOR="nvim"
|
||||
[ -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
|
||||
# Function to print messages if VERBOSE is enabled
|
||||
|
||||
@@ -114,9 +114,10 @@ end
|
||||
# cd to git root directory
|
||||
function cdgr --description 'cd to git root'
|
||||
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
|
||||
echo >&2 "Not in a git repository"
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/kubectl.fish
|
||||
@@ -1 +0,0 @@
|
||||
/Applications/OrbStack.app/Contents/MacOS/../Resources/completions/fish/orbctl.fish
|
||||
@@ -12,7 +12,7 @@ rust = "stable"
|
||||
"ubi:ClementTsang/bottom" = "latest"
|
||||
"ubi:ajeetdsouza/zoxide" = "latest"
|
||||
"ubi:tree-sitter/tree-sitter" = "latest"
|
||||
"ubi:neovim/neovim" = "latest"
|
||||
"ubi:neovim/neovim" = "latest" # Neovim editor binary
|
||||
"ubi:dandavison/delta" = "latest"
|
||||
|
||||
# Cargo-based tools (no pre-built binary available)
|
||||
@@ -32,7 +32,7 @@ rust = "stable"
|
||||
# npm-based tools
|
||||
"npm:editorconfig-checker" = "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"
|
||||
|
||||
# Python tools (via pipx backend)
|
||||
|
||||
@@ -102,4 +102,4 @@ function GetIntelephenseLicense()
|
||||
f:close()
|
||||
local stripped = string.gsub(content, '%s+', '')
|
||||
return stripped == '' and nil or stripped
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
" vint: +ProhibitAbbreviationOption +ProhibitSetNoCompatible
|
||||
|
||||
" 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
|
||||
"*****************************************************************************
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
vcs # git status
|
||||
# command_execution_time # previous command duration
|
||||
go
|
||||
mise
|
||||
asdf
|
||||
aws
|
||||
# =========================[ Line #2 ]=========================
|
||||
newline # \n
|
||||
|
||||
@@ -22,7 +22,6 @@ dfm.sh
|
||||
.phpactor.json
|
||||
.zsh_history
|
||||
|
||||
**/.claude/settings.local.json
|
||||
**/.claude/*
|
||||
**/.serena/*
|
||||
**/docs/plans/*
|
||||
|
||||
@@ -169,7 +169,7 @@ section_install()
|
||||
if ! command -v mise &> /dev/null; then
|
||||
msgr nested "Installing mise..."
|
||||
curl https://mise.run | sh
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
export PATH="${XDG_BIN_HOME:-$HOME/.local/bin}:$PATH"
|
||||
fi
|
||||
mise install --yes
|
||||
mise reshim
|
||||
|
||||
20
scripts/cleanup-old-version-managers.md
Normal file
20
scripts/cleanup-old-version-managers.md
Normal 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.
|
||||
@@ -13,8 +13,8 @@ remove_dir()
|
||||
{
|
||||
local dir="$1"
|
||||
local label="$2"
|
||||
if [ -d "$dir" ]; then
|
||||
if [ "$DRY_RUN" = "--dry-run" ]; then
|
||||
if [[ -d "$dir" ]]; then
|
||||
if [[ "$DRY_RUN" = "--dry-run" ]]; then
|
||||
msgr warn "[DRY RUN] Would remove $label: $dir"
|
||||
else
|
||||
msgr run "Removing $label: $dir"
|
||||
@@ -30,8 +30,8 @@ remove_file()
|
||||
{
|
||||
local file="$1"
|
||||
local label="$2"
|
||||
if [ -f "$file" ]; then
|
||||
if [ "$DRY_RUN" = "--dry-run" ]; then
|
||||
if [[ -f "$file" ]]; then
|
||||
if [[ "$DRY_RUN" = "--dry-run" ]]; then
|
||||
msgr warn "[DRY RUN] Would remove $label: $file"
|
||||
else
|
||||
rm -f "$file"
|
||||
@@ -67,7 +67,7 @@ remove_dir "$XDG_DATA_HOME/bob" "bob-nvim data"
|
||||
|
||||
CARGO_BIN="${XDG_DATA_HOME}/cargo/bin"
|
||||
CARGO_MANAGED_TOOLS=(
|
||||
bkt bottom btm difft difftastic eza fd rg ripgrep
|
||||
bkt btm difft eza fd rg
|
||||
tree-sitter tmux-sessionizer zoxide bob
|
||||
cargo-install-update cargo-cache
|
||||
)
|
||||
@@ -82,7 +82,7 @@ GO_BIN="${XDG_DATA_HOME}/go/bin"
|
||||
GO_MANAGED_TOOLS=(
|
||||
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
|
||||
remove_file "$GO_BIN/$tool" "go-installed $tool"
|
||||
done
|
||||
@@ -108,11 +108,12 @@ if command -v brew &> /dev/null; then
|
||||
)
|
||||
for pkg in "${BREW_REMOVE[@]}"; do
|
||||
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"
|
||||
else
|
||||
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"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -10,7 +10,7 @@ scripts/install-python-packages.sh
|
||||
|
||||
## 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`.
|
||||
|
||||
To add or remove packages, edit the `libraries` array in `scripts/install-python-packages.sh`.
|
||||
|
||||
Reference in New Issue
Block a user