Skip to content

Commit e689ad8

Browse files
committed
Manage fzf with mise
Entire-Checkpoint: dc0afbfeba5e
1 parent ed8f316 commit e689ad8

5 files changed

Lines changed: 28 additions & 5 deletions

File tree

agent-stack.plugin.zsh

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@ _agent_ensure_home() {
3333
local stack_home
3434
stack_home=$(_agent_stack_home)
3535

36-
mkdir -p "${stack_home}/.claude" "${stack_home}/.codex" "${stack_home}/.chrome-agent" "${stack_home}/.sheldon"
36+
mkdir -p \
37+
"${stack_home}/.claude" \
38+
"${stack_home}/.codex" \
39+
"${stack_home}/.chrome-agent" \
40+
"${stack_home}/.mise" \
41+
"${stack_home}/.mise/state" \
42+
"${stack_home}/.sheldon"
3743

3844
if [[ ! -f "${stack_home}/.env" ]]; then
3945
touch "${stack_home}/.env"
@@ -172,6 +178,8 @@ _agent_run() {
172178
${ssh_agent_args[@]} \
173179
-e CODEX_HOME=/home/agent/.agent-stack/.codex \
174180
-e CLAUDE_CONFIG_DIR=/home/agent/.agent-stack/.claude \
181+
-e MISE_GLOBAL_CONFIG_FILE=/home/agent/.agent-stack/.mise/config.toml \
182+
-e MISE_STATE_DIR=/home/agent/.agent-stack/.mise/state \
175183
--add-host host.docker.internal:host-gateway \
176184
"${image}" "${container_cmd[@]}"
177185
}

config/mise/config.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
[tools]
2+
fzf = "latest"
23
node = "23"

docker/.zshrc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
99
export SHELDON_CONFIG_FILE="$HOME/.agent-stack/.sheldon/plugins.toml"
1010
export SHELDON_DATA_DIR="$HOME/.agent-stack/.sheldon"
1111

12+
. ~/.profile.sh
13+
1214
if [[ -f "$SHELDON_CONFIG_FILE" ]]; then
1315
eval "$(sheldon source)"
1416
fi
1517

1618
eval "$(starship init zsh)"
17-
eval "$(fzf --zsh)"
19+
if command -v fzf >/dev/null 2>&1; then
20+
eval "$(fzf --zsh)"
21+
fi
1822
export _ZO_DATA_DIR="$HOME/.agent-stack/.zoxide"
1923
eval "$(zoxide init zsh)"
20-
21-
. ~/.profile.sh

docker/Dockerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1616
build-essential \
1717
ca-certificates \
1818
curl \
19-
fzf \
2019
git \
2120
git-lfs \
2221
grep \

docker/bin/agent-entrypoint

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,23 @@ start_tcp_bridges() {
5353
done
5454
}
5555

56+
ensure_mise_tools() {
57+
if ! command -v mise >/dev/null 2>&1; then
58+
return 0
59+
fi
60+
61+
if mise which fzf >/dev/null 2>&1; then
62+
return 0
63+
fi
64+
65+
mise use -g fzf@latest >/dev/null
66+
}
67+
5668
if [ "$(id -u)" = "0" ]; then
5769
fix_docker_socket_group
5870
exec gosu agent "$0" "$@"
5971
fi
6072

6173
start_tcp_bridges
74+
ensure_mise_tools
6275
exec "$@"

0 commit comments

Comments
 (0)