Repository navigation
Description
Problem
Installing J5 Code doesn't reliably give the person, or the agents their server runs, a working j5 command.
- The installer doesn't put
j5onPATH.scripts/install.shlinks~/.local/bin/j5and, when that directory isn't onPATH, prints "Add ~/.local/bin to your PATH" and stops. A stock macOS shell doesn't have~/.local/binonPATH. - The desktop app installs no CLI. Nothing in
apps/desktopcreates aj5command.j5 appindocs/user/install.mdassumes the CLI installer was run separately. - Agents get the server's
PATH, which often lacks it.- macOS background service:
PATHis frozen into the plist from the shell that ranj5 service install(apps/server/src/cloud/bootService.ts,environmentPath). It also adds the runtime's own directory, but that directory holdst3, notj5. - Linux background service: the unit sets no
PATH. The dogfood box only works because Ansible's90-j5-runtime.confdrop-in puts~/.local/binfirst. - Desktop app:
PATHis merged from the login shell, so it only works if the shell profile adds the directory.
- macOS background service:
Upstream T3 Code behaves the same way with t3 (checked against upstream main, 2026-09-29), so this is a change to upstream's product and needs a register entry.
Done when
Amended with Jackson on 2026-10-03: the Mac app no longer changes the person's PATH unprompted.
- Agents and terminals started by a J5 server can run
j5, in every launch mode: foreground, background service (macOS and Linux), and the Mac app. - After a command-line install,
j5runs for the user who installed it, in a new shell, with no manualPATHedit. - After installing only the Mac app, the person gets
j5in their own terminal by asking for it in the app (Desktop app: a command to install j5 for your own terminal #441). The app never edits shell files unprompted. j5 uninstallremoves what the install added.
Reported by Jackson, 2026-10-02: agents on his laptop report j5 is not on PATH.
Design (agreed with Jackson, 2026-10-03)
- Agents and terminals (feat(server): agents can run the server's own j5 #417, feat(desktop): the Mac app gives its agents the j5 command #418): each J5 home has a
bindirectory holding onlyj5. A release server points<home>/bin/j5at its own executable; the Mac app writes a script there that runs its bundled CLI. Both put<home>/binfirst on thePATHtheir agents inherit, so agents get exactly their server's CLI. - The command-line installer (feat(cli): the installer puts j5 on your PATH #416): when
~/.local/binisn't onPATH, it appends one marked line to the shell's startup file (zsh, bash, fish), with the directory at the end ofPATH.J5CODE_NO_MODIFY_PATH=1skips it, andj5 uninstallremoves it. Chosen over linking into/usr/local/bin, which needs an admin prompt and a root-owned file the server can't repoint. - The Mac app and the person's terminal (Desktop app: a command to install j5 for your own terminal #441): an in-app command installs
j5on request. A survey of other tools found that most desktop apps never edit shell files, and the few that do have had bugs from it.
Probed on the signed, notarized Mac app (0.0.47, macOS 27.0.1, 2026-10-03): ELECTRON_RUN_AS_NODE=1 exec "/Applications/J5 Code.app/Contents/MacOS/J5 Code" "/Applications/J5 Code.app/Contents/Resources/app.asar/apps/server/dist/bin.mjs" "$@" ran --version, --help, project add and project rename with exit 0, no Dock icon and no dialogs.
Activity
feat(desktop): a command palette action installs j5 for your own term…