-
Notifications
You must be signed in to change notification settings - Fork 0
Manage coding-agent CLIs with mise #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| {{- /* chezmoi:modify-template */ -}} | ||
| {{- $input := .chezmoi.stdin -}} | ||
| {{- $output := "" -}} | ||
| {{- if not $input -}} | ||
| {{- $output = `{ | ||
| "env": { | ||
| "DISABLE_UPDATES": "1" | ||
| } | ||
| }` -}} | ||
| {{- else if regexMatch `(?m)^\s*"DISABLE_UPDATES"\s*:` $input -}} | ||
| {{- $output = ($input | replaceAllRegex `(?m)^(\s*)"DISABLE_UPDATES"\s*:\s*"[^"]*"(\s*,?)` `${1}"DISABLE_UPDATES": "1"${2}`) -}} | ||
| {{- else if regexMatch `(?m)^\s*"env"\s*:\s*\{\s*\}` $input -}} | ||
| {{- $output = ($input | replaceAllRegex `(?m)^(\s*)"env"\s*:\s*\{\s*\}` `${1}"env": { | ||
| ${1} "DISABLE_UPDATES": "1" | ||
| ${1}}`) -}} | ||
| {{- else if regexMatch `(?m)^\s*"env"\s*:\s*\{\s*$` $input -}} | ||
| {{- $output = ($input | replaceAllRegex `(?m)^(\s*)("env"\s*:\s*\{\s*)$` `${1}${2} | ||
| ${1} "DISABLE_UPDATES": "1",`) -}} | ||
| {{- else -}} | ||
| {{- $output = ($input | replaceAllRegex `(?s)^(\s*\{)` `${1} | ||
| "env": { | ||
| "DISABLE_UPDATES": "1" | ||
| },`) -}} | ||
|
Comment on lines
+10
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -e
printf '%s\n' '--- tracked files ---'
git ls-files 'dot_claude/modify_settings.json' 'dot_config/opencode/modify_opencode.jsonc'
printf '%s\n' '--- modify_settings.json ---'
cat -n dot_claude/modify_settings.json
printf '%s\n' '--- modify_opencode.jsonc ---'
cat -n dot_config/opencode/modify_opencode.jsonc
printf '%s\n' '--- related references ---'
rg -n --hidden --glob '!*.git*' 'modify_settings|modify_opencode|DISABLE_UPDATES|autoupdate|regexMatch|replaceAllRegex' .Repository: kelchm/dotfiles Length of output: 4185 🏁 Script executed: #!/bin/bash
set -e
python3 - <<'PY'
from pathlib import Path
for name in ("dot_claude/modify_settings.json", "dot_config/opencode/modify_opencode.jsonc"):
p = Path(name)
print(f"--- {name}: {p.stat().st_size} bytes ---")
print(p.read_text())
PYRepository: kelchm/dotfiles Length of output: 1773 🏁 Script executed: #!/bin/bash
set -e
python3 - <<'PY'
import json
import re
claude_key = re.compile(r'(?m)^\s*"DISABLE_UPDATES"\s*:')
claude_replace = re.compile(r'(?m)^(\s*)"DISABLE_UPDATES"\s*:\s*"[^"]*"(\s*,?)')
claude_empty_env = re.compile(r'(?m)^(\s*)"env"\s*:\s*\{\s*\}')
claude_open_env = re.compile(r'(?m)^(\s*)("env"\s*:\s*\{\s*)$')
claude_root = re.compile(r'(?s)^(\s*\{)')
open_key = re.compile(r'(?m)^\s*"autoupdate"\s*:')
open_replace = re.compile(r'(?m)^(\s*)"autoupdate"\s*:\s*(?:true|false|"notify")(\s*,?)')
open_root = re.compile(r'(?s)^(\s*\{)')
def replace_claude(s):
if not s:
return '{\n "env": {\n "DISABLE_UPDATES": "1"\n }\n}'
if claude_key.search(s):
return claude_replace.sub(r'\1"DISABLE_UPDATES": "1"\2', s)
if claude_empty_env.search(s):
return claude_empty_env.sub(r'\1"env": {\n\1 "DISABLE_UPDATES": "1"\n\1}', s)
if claude_open_env.search(s):
return claude_open_env.sub(r'\1\2\n\1 "DISABLE_UPDATES": "1",', s)
return claude_root.sub(r'\1\n "env": {\n "DISABLE_UPDATES": "1"\n },', s)
def replace_open(s):
if not s:
return '{\n "$schema": "https://opencode.ai/config.json",\n "autoupdate": false\n}'
if open_key.search(s):
return open_replace.sub(r'\1"autoupdate": false\2', s)
return open_root.sub(r'\1\n "autoupdate": false,', s)
cases = [
("claude compact existing env", replace_claude,
'{"env":{"DISABLE_UPDATES":"0","X":"y"}}'),
("claude compact existing policy", replace_claude,
'{"DISABLE_UPDATES":"0"}'),
("claude multiline numeric policy", replace_claude,
'{\n "DISABLE_UPDATES": 0\n}'),
("claude multiline boolean policy", replace_claude,
'{\n "DISABLE_UPDATES": false\n}'),
("opencode compact existing policy", replace_open,
'{"autoupdate":true,"theme":"dark"}'),
("opencode leading line comment", replace_open,
'// existing comment\n{"theme":"dark"}'),
("opencode leading block comment", replace_open,
'/* existing comment */\n{"theme":"dark"}'),
("opencode inline comment after root", replace_open,
'{\n // existing comment\n "theme": "dark"\n}'),
]
for name, fn, inp in cases:
out = fn(inp)
print(f"\n--- {name} ---")
print("input :", repr(inp))
print("output:", repr(out))
try:
json.loads(out)
print("json : valid")
except Exception as e:
print("json :", type(e).__name__, str(e))
PYRepository: kelchm/dotfiles Length of output: 1654 Update both configuration modifiers structurally. Compact inputs can create duplicate 🧰 Tools🪛 Biome (2.5.6)[error] 10-10: Expected a property but instead found '{'. (parse) [error] 10-10: Minus must be followed by a digit (parse) [error] 10-10: unexpected character ``` (parse) [error] 10-10: unexpected character (parse) [error] 10-10: unexpected character (parse) [error] 10-10: unexpected character (parse) [error] 10-10: unexpected character (parse) [error] 10-10: unexpected character (parse) [error] 10-10: unexpected character (parse) [error] 10-10: expected (parse) [error] 10-10: unexpected character (parse) [error] 10-10: expected (parse) [error] 10-10: unexpected character (parse) [error] 10-10: expected (parse) [error] 10-10: unexpected character ``` (parse) [error] 10-10: expected (parse) [error] 10-10: End of file expected (parse) [error] 10-10: Minus must be followed by a digit (parse) [error] 11-11: Expected a property but instead found '{'. (parse) [error] 11-11: Minus must be followed by a digit (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character ``` (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: unexpected character (parse) [error] 11-11: expected (parse) [error] 11-11: unexpected character (parse) [error] 11-11: expected (parse) [error] 11-11: unexpected character (parse) [error] 11-11: expected (parse) [error] 11-11: unexpected character (parse) [error] 11-11: expected (parse) [error] 11-11: unexpected character (parse) [error] 11-11: expected (parse) [error] 11-11: expected (parse) [error] 11-11: End of file expected (parse) [error] 11-11: End of file expected (parse) [error] 11-11: unexpected character (parse) [error] 11-11: Invalid escape sequence (parse) [error] 11-11: End of file expected (parse) [error] 11-11: End of file expected (parse) [error] 11-11: Missing closing quote (parse) [error] 12-12: Expected a property but instead found '{'. (parse) [error] 12-12: Minus must be followed by a digit (parse) [error] 12-12: unexpected character ``` (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: expected (parse) [error] 12-12: unexpected character (parse) [error] 12-12: expected (parse) [error] 12-12: unexpected character (parse) [error] 12-12: expected (parse) [error] 12-12: unexpected character (parse) [error] 12-12: expected (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: expected (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: unexpected character (parse) [error] 12-12: End of file expected (parse) [error] 12-12: unexpected character ``` (parse) [error] 12-12: Minus must be followed by a digit (parse) [error] 13-13: Expected a property but instead found '{'. (parse) [error] 13-13: Minus must be followed by a digit (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character ``` (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: expected (parse) [error] 13-13: unexpected character (parse) [error] 13-13: expected (parse) [error] 13-13: unexpected character (parse) [error] 13-13: expected (parse) [error] 13-13: unexpected character (parse) [error] 13-13: expected (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: expected (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character (parse) [error] 13-13: unexpected character ``` (parse) [error] 13-13: unexpected character ``` (parse) [error] 13-13: expected (parse) [error] 13-13: Expected a property but instead found '1'. (parse) [error] 13-13: expected (parse) [error] 14-14: Property key must be double quoted (parse) [error] 14-14: expected (parse) [error] 14-14: Expected a property but instead found '1'. (parse) [error] 14-14: expected (parse) [error] 15-15: expected (parse) [error] 15-15: expected (parse) [error] 15-15: Expected a property but instead found '1'. (parse) [error] 13-15: End of file expected (parse) [error] 15-15: unexpected character ``` (parse) [error] 15-15: unexpected character (parse) [error] 15-15: Minus must be followed by a digit (parse) [error] 16-16: Expected a property but instead found '{'. (parse) [error] 16-16: Minus must be followed by a digit (parse) [error] 16-16: unexpected character ``` (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character (parse) [error] 16-16: expected (parse) [error] 16-16: unexpected character (parse) [error] 16-16: expected (parse) [error] 16-16: unexpected character (parse) [error] 16-16: expected (parse) [error] 16-16: unexpected character (parse) [error] 16-16: expected (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character (parse) [error] 16-16: expected (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character (parse) [error] 16-16: unexpected character ``` (parse) [error] 16-16: Minus must be followed by a digit (parse) [error] 17-17: expected (parse) [error] 17-17: Expected a property but instead found '{'. (parse) [error] 17-17: Minus must be followed by a digit (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character ``` (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: expected (parse) [error] 17-17: unexpected character (parse) [error] 17-17: expected (parse) [error] 17-17: unexpected character (parse) [error] 17-17: expected (parse) [error] 17-17: unexpected character (parse) [error] 17-17: expected (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: expected (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character (parse) [error] 17-17: unexpected character ``` (parse) [error] 17-17: unexpected character ``` (parse) [error] 17-17: expected (parse) [error] 17-17: Expected a property but instead found '1'. (parse) [error] 17-17: expected (parse) [error] 17-17: expected (parse) [error] 17-17: Expected a property but instead found '2'. (parse) [error] 18-18: expected (parse) [error] 18-18: expected (parse) [error] 18-18: Expected a property but instead found '1'. (parse) [error] 18-18: expected (parse) [error] 18-18: unexpected character ``` (parse) [error] 18-18: unexpected character (parse) [error] 18-18: Minus must be followed by a digit (parse) [error] 19-19: expected (parse) [error] 19-19: Expected a property but instead found '{'. (parse) [error] 19-19: Minus must be followed by a digit (parse) [error] 19-19: Minus must be followed by a digit (parse) [error] 20-20: expected (parse) [error] 20-20: Expected a property but instead found '{'. (parse) [error] 20-20: Minus must be followed by a digit (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character ``` (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character (parse) [error] 20-20: expected (parse) [error] 20-20: unexpected character (parse) [error] 20-20: unexpected character ``` (parse) [error] 20-20: unexpected character ``` (parse) [error] 20-20: expected (parse) [error] 20-20: Expected a property but instead found '1'. (parse) [error] 21-21: expected (parse) [error] 23-23: unexpected character ``` (parse) [error] 23-23: unexpected character (parse) [error] 23-23: Minus must be followed by a digit (parse) 📍 Affects 2 files
🤖 Prompt for AI AgentsSource: MCP tools |
||
| {{- end -}} | ||
| {{- printf "%s\n" ($output | trimSuffix "\n") -}} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,23 @@ | ||
| [tools] | ||
| # Coding-agent CLIs use mise as their single install/update owner on every OS. | ||
| # Registry backends: Aqua for Claude/Codex/OpenCode; xAI's HTTP releases for Grok. | ||
| claude = "latest" | ||
| codex = "latest" | ||
| grok = "latest" | ||
| node = "lts" | ||
| opencode = "latest" | ||
| python = "3.12" | ||
| uv = "latest" | ||
|
|
||
| [tasks."agent-clis:outdated"] | ||
| description = "Check coding-agent CLIs for updates" | ||
| run = "mise outdated claude codex grok opencode" | ||
|
|
||
| [tasks."agent-clis:update"] | ||
| description = "Update all coding-agent CLIs managed by mise" | ||
| run = "mise upgrade claude codex grok opencode" | ||
|
|
||
| [settings] | ||
| python.uv_venv_auto = true # auto-creates/activates .venv via uv | ||
| python.uv_venv_auto = "create|source" # auto-creates/activates .venv via uv | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- target file ---'
cat -n dot_config/mise/config.toml | sed -n '1,45p'
printf '%s\n' '--- related configuration and documentation references ---'
rg -n -i 'uv_venv_auto|uv\.lock|uv-managed|venv' . --glob '!node_modules' --glob '!dist' --glob '!build' | head -200Repository: kelchm/dotfiles Length of output: 1250 🌐 Web query:
💡 Result: In mise, the python.uv_venv_auto setting is used to automatically detect, source, or create the virtual environment (.venv) managed by uv [1][2]. Key requirements and behaviors include: 1. Requirement for uv.lock: mise identifies a project as a uv-managed project by searching for a uv.lock file in the current or parent directories [3][4]. If no uv.lock file is present, the python.uv_venv_auto setting will be a silent no-op [5]. You can generate this file by running uv sync or uv lock [3][6]. 2. Configuration Options: This setting is placed in the [settings] section of your mise.toml file [3][4]. The available options are: - "source": Only sources an existing.venv [1][2]. - "create|source": Creates the virtual environment if it is missing, then sources it [1][2]. - false: Disables the integration [2][7]. - true (legacy): Behaves similarly to "create|source" but also exports UV_PYTHON to force uv to use the Python version managed by mise [2][7]. Note that this value is considered legacy and will be deprecated in a future release [2]. When configured, mise will automatically manage the activation of the uv-managed environment, removing the need for manual activation [8]. mise respects the UV_PROJECT_ENVIRONMENT environment variable if you have configured a custom path for your virtual environment; otherwise, it defaults to.venv [4][7]. Citations:
Document the
🤖 Prompt for AI AgentsSource: MCP tools |
||
| # Let per-repo rust-toolchain.toml drive the Rust version. | ||
| idiomatic_version_file_enable_tools = ["rust"] | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| {{- /* chezmoi:modify-template */ -}} | ||
| {{- $input := .chezmoi.stdin -}} | ||
| {{- $output := "" -}} | ||
| {{- if not $input -}} | ||
| {{- $output = `{ | ||
| "$schema": "https://opencode.ai/config.json", | ||
| "autoupdate": false | ||
| }` -}} | ||
| {{- else if regexMatch `(?m)^\s*"autoupdate"\s*:` $input -}} | ||
| {{- $output = ($input | replaceAllRegex `(?m)^(\s*)"autoupdate"\s*:\s*(?:true|false|"notify")(\s*,?)` `${1}"autoupdate": false${2}`) -}} | ||
| {{- else -}} | ||
| {{- $output = ($input | replaceAllRegex `(?s)^(\s*\{)` `${1} | ||
| "autoupdate": false,`) -}} | ||
| {{- end -}} | ||
| {{- printf "%s\n" ($output | trimSuffix "\n") -}} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| {{- /* chezmoi:modify-template */ -}} | ||
| {{- $input := .chezmoi.stdin -}} | ||
| {{- $output := "" -}} | ||
| {{- if not $input -}} | ||
| {{- $output = `[cli] | ||
| auto_update = false` -}} | ||
| {{- else if regexMatch `(?m)^\s*auto_update\s*=` $input -}} | ||
| {{- $output = ($input | replaceAllRegex `(?m)^(\s*)auto_update\s*=\s*[^\r\n#]*(\s*(?:#.*)?)$` `${1}auto_update = false${2}`) -}} | ||
| {{- else if regexMatch `(?m)^\s*\[cli\]\s*$` $input -}} | ||
| {{- $output = ($input | replaceAllRegex `(?m)^(\s*\[cli\]\s*)$` `${1} | ||
| auto_update = false`) -}} | ||
| {{- else -}} | ||
| {{- $output = printf "%s\n[cli]\nauto_update = false" ($input | trimSuffix "\n") -}} | ||
|
Comment on lines
+7
to
+13
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -eu
file=$(fd -t f -g 'modify_config.toml' . | head -n 1)
printf '%s\n' "FILE=$file"
cat -n "$file"
printf '\n--- references to modify_config.toml and auto_update ---\n'
rg -n -C 3 'modify_config\.toml|auto_update|\[cli\]' .Repository: kelchm/dotfiles Length of output: 2091 🏁 Script executed: #!/bin/bash
set -eu
printf '%s\n' '--- repository files ---'
git ls-files | sed -n '1,160p'
printf '\n--- template/test tooling references ---\n'
rg -n -C 3 'chezmoi:modify-template|modify_config|regexMatch|replaceAllRegex|auto_update' --glob '!dot_grok/modify_config.toml' .
printf '\n--- available runtimes ---\n'
command -v go || true
command -v chezmoi || true
command -v python3 || trueRepository: kelchm/dotfiles Length of output: 4592 🏁 Script executed: #!/bin/bash
set -eu
cat > /tmp/verify_modify_config.go <<'EOF'
package main
import (
"fmt"
"regexp"
"strings"
)
func transform(input string) string {
if input == "" {
return "[cli]\nauto_update = false"
}
hasAutoUpdate := regexp.MustCompile(`(?m)^\s*auto_update\s*=`).MatchString(input)
if hasAutoUpdate {
return regexp.MustCompile(`(?m)^(\s*)auto_update\s*=\s*[^\r\n#]*(\s*(?:#.*)?)$`).
ReplaceAllString(input, `${1}auto_update = false${2}`)
}
hasCLI := regexp.MustCompile(`(?m)^\s*\[cli\]\s*$`).MatchString(input)
if hasCLI {
return regexp.MustCompile(`(?m)^(\s*\[cli\]\s*)$`).
ReplaceAllString(input, "${1}\nauto_update = false")
}
return fmt.Sprintf("%s\n[cli]\nauto_update = false", strings.TrimSuffix(input, "\n"))
}
func main() {
cases := map[string]string{
"other table before cli": "[other]\nauto_update = true\n\n[cli]\nendpoint = \"x\"\n",
"cli header comment": "[cli] # managed settings\nendpoint = \"x\"\n",
"cli key": "[cli]\nauto_update = true\n",
}
for name, input := range cases {
fmt.Printf("--- %s ---\ninput:\n%soutput:\n%s\n", name, input, transform(input))
}
}
EOF
go run /tmp/verify_modify_config.goRepository: kelchm/dotfiles Length of output: 530 Scope When another table contains 🤖 Prompt for AI AgentsSource: MCP tools |
||
| {{- end -}} | ||
| {{- printf "%s\n" ($output | trimSuffix "\n") -}} | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: kelchm/dotfiles
Length of output: 10466
🌐 Web query:
site:mise.jdx.dev mise which command PATH shims troubleshooting which -a Get-Command💡 Result:
To troubleshoot mise command PATH and shim issues, use the following commands and strategies based on official documentation: Core Troubleshooting Commands: - mise doctor: The primary diagnostic tool. Run this to check if mise is correctly activated and to identify potential configuration problems [1]. - mise doctor path: Displays the current PATH entries being provided by mise [2]. - which -a [command]: Use this to verify which executable is being called first in your PATH. If the directory returned is not a mise directory (typically located in ~/.local/share/mise/installs/ or
/.local/share/mise/shims/), mise is not first in your PATH, and another system binary is shadowing the mise-managed tool [1]. - mise which [tool]: Returns the absolute path to the executable mise is currently resolving for that tool [3]. Understanding Activation Methods: Mise provides two distinct ways to manage tools, which impact how PATH and commands are resolved: 1. PATH Activation (mise activate): Mise updates the PATH environment variable every time your prompt is displayed [4]. This is recommended for interactive shells [4][5]. If tools are not working, ensure the activation snippet is correctly added to your shell's configuration file (e.g.,.bashrc,.zshrc, or $PROFILE for PowerShell) [6][5]. 2. Shims: Shims are lightweight wrappers that intercept command calls and route them to the correct tool version based on the current directory [4]. They are preferred for non-interactive environments like CI/CD, scripts, and IDEs [1][5]. If you use shims, ensure the shims directory (/.local/share/mise/shims/) is in your PATH [1][3]. Common Issues: - Shadowing: If a tool version is configured but does not appear to be in use, mise may be falling back to a system binary. This happens when a shim cannot resolve a tool or if PATH activation is not correctly prepending the mise bin directories [7][4]. - Non-interactive Shells: If you use PATH activation but run commands in non-interactive scripts, the environment variables may not be updated because the prompt is never displayed [4]. In these cases, use mise exec [1] or switch to using shims [4]. - Missing Shims: If you install a new tool via a package manager (like pip) and it does not appear, run mise reshim to regenerate the shim binaries [8]. For IDEs and specific integrations, adding the shims directory to your PATH is often the most reliable way to ensure tools are correctly identified without complex environment variable modifications [3].Citations:
🏁 Script executed:
Repository: kelchm/dotfiles
Length of output: 418
Verify shell-resolved binaries before removing older installations.
mise which <tool>reports mise’s selected executable, but not the executable that the shell resolves first. Addcommand -vorwhich -achecks for POSIX shells andGet-Command <tool> -Allchecks for PowerShell. Remove shadowing installations only when the first result is mise-managed.🤖 Prompt for AI Agents
Source: MCP tools