unable to "Locate the CLI for Bitwarden named bw"

38 views
Skip to first unread message

Andre Krainik

unread,
Apr 25, 2026, 3:24:17 PM (9 days ago) Apr 25
to iterm2-discuss
I'm trying to set up / link my bitwarden instance.   i have bitwarden-cli installed and working.   When I'm prompted to "Locate the CLI for Bitwarden named bw", all the options in /usr/local/bin including "bw" are greyed out and unselectable.

thoughts? 

George Nachman

unread,
Apr 25, 2026, 5:53:12 PM (9 days ago) Apr 25
to iterm2-...@googlegroups.com
I'd like to understand exactly what's happening before changing anything, because the picker is supposed to grey out non-executables but bw should pass that test. A few possibilities:

- macOS's UTI database hasn't classified /usr/local/bin/bw as a unix executable (not uncommon for files in /usr/local/bin because Spotlight excludes that path by default).
- The Bitwarden installer placed the binary with extended attributes (quarantine, provenance, etc.) that affect Launch Services'classification.
- Architecture mismatch — e.g., the file is x86_64-only and iTerm2 is running natively as arm64, so Launch Services declines to mark it as runnable on this system.
- Something else specific to your install.

Could you run these and send back the output?

sw_vers
uname -m
ls -lO@e /usr/local/bin/bw
file /usr/local/bin/bw
xattr -l /usr/local/bin/bw
codesign -dv /usr/local/bin/bw 2>&1
mdls -name kMDItemContentType -name kMDItemContentTypeTree -name kMDItemKind /usr/local/bin/bw
lsappinfo find lsappinfopath=/usr/local/bin/bw 2>&1 | head

Then, just to test a hypothesis, run:

mdimport /usr/local/bin/bw
mdls -name kMDItemContentType -name kMDItemContentTypeTree /usr/local/bin/bw

…and if that second mdls now reports something containing public.unix-executable, re-open the iTerm2 Bitwarden setup and try selecting bw again. Tell me whether the row is now selectable or still greyed out.

Also useful to know:

1. How did you install bw? Homebrew, npm, the standalone installer from bitwarden.com, or something else? If you don't remember, `which bw` plus `ls -l $(which bw)` (in case it's a symlink) will help.
2. Which version of iTerm2 are you running (iTerm2 → About iTerm2)? Stable, beta, or a dev build?
3. In the picker, is bw greyed out the same way as everything else in /usr/local/bin, or is it specifically bw that's disabled while other binaries (like git, node, etc.) are selectable? That tells me whether the filter is rejecting all of /usr/local/bin or just this one file.
4. If you click bw even though it's greyed, does anything happen — beep, tooltip, nothing?

Once I see what Launch Services thinks the file is, I'll know whether this is a UTI-classification issue, a quarantine/codesign issue, an architecture issue, or something else,.


On Apr 24, 2026 at 8:58:44 PM, Andre Krainik <pls...@gmail.com> wrote:
I'm trying to set up / link my bitwarden instance.   i have bitwarden-cli installed and working.   When I'm prompted to "Locate the CLI for Bitwarden named bw", all the options in /usr/local/bin including "bw" are greyed out and unselectable.

thoughts? 

--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/iterm2-discuss/96c28062-9b73-464d-87d1-a608801ab423n%40googlegroups.com.

Andre Krainik

unread,
Apr 27, 2026, 11:31:08 AM (7 days ago) Apr 27
to iterm2-discuss
Thanks so much for your reply!      I've gone through the steps as per your instructions; please let me know if any of my replies need further clarification.   

=========================================
sw_vers
ProductName: macOS
ProductVersion: 15.7.4
BuildVersion: 24G517
uname -m
x86_64
 ls -lO@e /usr/local/bin/bw

lrwxr-xr-x  1 *******  admin  -   39B Apr 24 21:29 /usr/local/bin/bw@ -> ../Cellar/bitwarden-cli/2026.4.1/bin/bw
 file /usr/local/bin/bw

/usr/local/bin/bw: a /usr/local/opt/node/bin/node script text executable, ASCII text, with very long lines (3624)
 xattr -l /usr/local/bin/bw

com.apple.lastuseddate#PS: �8�i
 codesign -dv /usr/local/bin/bw 2>&1

/usr/local/bin/bw: code object is not signed at all
 mdls -name kMDItemContentType -name kMDItemContentTypeTree -name kMDItemKind /usr/local/bin/bw

kMDItemContentType     = "com.netscape.javascript-source"
kMDItemContentTypeTree = (
    "com.netscape.javascript-source",
    "public.script",
    "public.source-code",
    "public.plain-text",
    "public.text",
    "public.data",
    "public.item",
    "public.content",
    "public.executable"
)
kMDItemKind            = "PlainTextType"
 lsappinfo find lsappinfopath=/usr/local/bin/bw 2>&1 | head

-> no return
==========================================================


Then, just to test a hypothesis, run:

mdimport /usr/local/bin/bw
mdls -name kMDItemContentType -name kMDItemContentTypeTree /usr/local/bin/bw

…and if that second mdls now reports something containing public.unix-executable, re-open the iTerm2 Bitwarden setup and try selecting bw again. Tell me whether the row is now selectable or still greyed out.

-> bw is still greyed out
——————————————————————


Also useful to know:

1. How did you install bw? Homebrew, npm, the standalone installer from bitwarden.com, or something else? If you don't remember, `which bw` plus `ls -l $(which bw)` (in case it's a symlink) will help.
-> installed via home-brew


2. Which version of iTerm2 are you running (iTerm2 → About iTerm2)? Stable, beta, or a dev build?
-> Build 3.6.10


3. In the picker, is bw greyed out the same way as everything else in /usr/local/bin, or is it specifically bw that's disabled while other binaries (like git, node, etc.) are selectable? That tells me whether the filter is rejecting all of /usr/local/bin or just this one file.
-> everything is greyed out, none are selectable


4. If you click bw even though it's greyed, does anything happen — beep, tooltip, nothing?
-> nothing happens.


George Nachman

unread,
Apr 27, 2026, 4:03:28 PM (7 days ago) Apr 27
to iterm2-...@googlegroups.com
Not sure why your bw is a script while mine is a binary, but commit 8641749143ca3f987ecfae369ed386d70a04bba1 allows you to pick anything named bw now. You can verify in tomorrow’s nightly build.

Adrian Bool

unread,
Apr 28, 2026, 2:07:36 AM (6 days ago) Apr 28
to iterm2-...@googlegroups.com
Hi,

I had a play around and found that "brew install bitwarden-cli" installs - among many other files! - the main bitwarden-cli (Typescript) file as "build/bw.js".  The homebrew linking process creates chain of symbolic links from "bin/bw" to "build/bw.js".

It looks like, when assigning a Bitwarden endpoint, iTerm is only accepting files called "bw".  iTerm is following the symbolic link chains in this determination.  As a result the "bin/bw" isn't selectable as the file behind the link is really "build/bw.js".  (Copying build/bw.js to build/bw allows the file to be selectable within iTerm - possibly a quick test/fix for Andre.)

Given that George's "bw" is a binary file - and the homebrew is text (minified Typescript) it feels like there may be more than one "bw" command implementation out there...

Hope this is helpful.

Cheers

aid

Adrian Bool

unread,
Apr 28, 2026, 2:39:09 PM (6 days ago) Apr 28
to iterm2-...@googlegroups.com

Hey,

Heads up for anyone running bitwarden-cli.

Version 2026.4.0 of this tool was compromised on the 22nd April.  If you could have had that software on your system, be aware and perhaps check out the following article (or at least its Recommended Actions towards the end):


Cheers,

aid

George Nachman

unread,
Apr 29, 2026, 2:29:18 PM (5 days ago) Apr 29
to iterm2-...@googlegroups.com
Thanks for the diagnosis. NSOpenPanel is resolving the symlink chain before calling the delegate, so it gets …/build/bw.js and the lastPathComponent == "bw" check fails. Just pushed commit bf9e2cb484e8d54f3522ea28637a79110f012096 that also accepts the resolved name (anything whose name minus extension is bw, so bw.js, bw.sh, etc.). Will be in tomorrow's nightly.


--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages