Skip to content

The j5 CLI isn't reachable after install: not on PATH, and the desktop app doesn't provide it #397

Closed

Description

@Jacksondr5

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 j5 on PATH. scripts/install.sh links ~/.local/bin/j5 and, when that directory isn't on PATH, prints "Add ~/.local/bin to your PATH" and stops. A stock macOS shell doesn't have ~/.local/bin on PATH.
  • The desktop app installs no CLI. Nothing in apps/desktop creates a j5 command. j5 app in docs/user/install.md assumes the CLI installer was run separately.
  • Agents get the server's PATH, which often lacks it.
    • macOS background service: PATH is frozen into the plist from the shell that ran j5 service install (apps/server/src/cloud/bootService.ts, environmentPath). It also adds the runtime's own directory, but that directory holds t3, not j5.
    • Linux background service: the unit sets no PATH. The dogfood box only works because Ansible's 90-j5-runtime.conf drop-in puts ~/.local/bin first.
    • Desktop app: PATH is merged from the login shell, so it only works if the shell profile adds the directory.

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, j5 runs for the user who installed it, in a new shell, with no manual PATH edit.
  • After installing only the Mac app, the person gets j5 in 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 uninstall removes 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)

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

  1. added a commit that references this issue on Oct 4, 2026
    e26e46b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions