Package io.github.jbastgen.stemma.app.ai
Class ToolLookup
java.lang.Object
io.github.jbastgen.stemma.app.ai.ToolLookup
Finds a program for the local AI tool. An application that was started from the desktop (the Finder, the Dock, a launcher) has a
short
PATH that does not hold what the user's shell adds in .zshrc or .profile: ~/.local/bin,
Homebrew, npm and so on. So when a program is not on the PATH of this process, the PATH of the user's login shell
and a few usual folders are searched as well, and a tool that is started gets that wider PATH, because many tools (a
node script behind claude, for example) need to find more programs themselves.-
Method Summary
Modifier and TypeMethodDescriptionThe program for a name: the first executable of that name on the PATH of this process, else on the PATH of the user's login shell or in the usual folders.The first executable calledname(with the usual Windows extensions) on the PATH of this process only.static StringThe folders to search and to give to a tool: this process's PATH first, then the login shell's, then the usual folders.
-
Method Details
-
onPath
The first executable calledname(with the usual Windows extensions) on the PATH of this process only. -
find
The program for a name: the first executable of that name on the PATH of this process, else on the PATH of the user's login shell or in the usual folders. -
searchPath
The folders to search and to give to a tool: this process's PATH first, then the login shell's, then the usual folders.
-