From 8cf74b95beb1c27503586e9cc03d382a2e7f2f68 Mon Sep 17 00:00:00 2001 From: Harivansh Rathi Date: Thu, 2 Apr 2026 00:11:18 -0400 Subject: [PATCH] fix agent-browser PATH: add npm global bin to zsh path - Add npm global bin dir to zsh path array so agent-browser (and other npm -g binaries) are found in interactive shells - Fix activation check to look for the binary at the actual npm prefix path instead of relying on command -v with wrong PATH --- home/agent-browser.nix | 3 ++- home/zsh.nix | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/home/agent-browser.nix b/home/agent-browser.nix index 5e49d6d..0121295 100644 --- a/home/agent-browser.nix +++ b/home/agent-browser.nix @@ -21,7 +21,8 @@ lib.mkIf (!hostConfig.isDarwin) { ] }:$PATH" - if ! command -v agent-browser >/dev/null 2>&1; then + npm_bin="$(npm prefix -g 2>/dev/null)/bin" + if [ ! -x "$npm_bin/agent-browser" ]; then npm install -g agent-browser 2>/dev/null || true fi ''; diff --git a/home/zsh.nix b/home/zsh.nix index 5b0ae2c..a758fd7 100644 --- a/home/zsh.nix +++ b/home/zsh.nix @@ -83,6 +83,7 @@ "$BUN_INSTALL/bin" "$HOME/.antigravity/antigravity/bin" "$HOME/.opencode/bin" + "$(npm prefix -g 2>/dev/null)/bin" "${pkgs.postgresql_17}/bin" "$HOME/.nix-profile/bin" "/run/wrappers/bin"