Skip to content

feat(app): show how to install Claude Code when claude is missing - #55

Open
THPubs wants to merge 1 commit into
feat/windowsfrom
feat/claude-cli-check
Open

THPubs wants to merge 1 commit into
feat/windowsfrom
feat/claude-cli-check

Conversation

@THPubs

@THPubs THPubs commented Nov 2, 2026

Copy link
Copy Markdown
Member

What changed

  • At launch, Kriyon checks whether the claude command a new session would run is installed. This is the Claude CLI check (new glossary term in docs/context/runtime.md).
    • It looks on the PATH a new session's shell gets, read fresh: the person's shell PATH probed again on macOS, and on Windows the PATH from their environment settings, which the PTY library already reads for every new session. So Check again sees a claude installed a minute ago, with no restart.
    • A PATH that can't be read counts as unknown, never missing.
  • Only when nothing is found does the app show a new Install Claude Code screen, after the welcome screen. It gives:
    • Claude Code's own recommended install command for that computer, from code.claude.com/docs/en/setup: curl -fsSL https://claude.ai/install.sh | bash on Mac, irm https://claude.ai/install.ps1 | iex on Windows, with a Copy button.
    • How to confirm the install worked (claude --version), and how sign-in happens.
    • On Windows, the docs' Git for Windows recommendation.
    • A link to the docs' "Fix your PATH" section.
    • Check again, and Continue anyway, which hides the screen for this run.
  • The active session doesn't start while the screen shows, so it doesn't just print "command not found".
  • spawn::on_path only knew the Windows rule (try each PATHEXT extension). Off Windows a name is now the file itself, and only an executable one counts. Its existing callers are all Windows-only, so nothing changes for them.
  • The welcome screen's page styles moved to src/welcome/screenStyles.ts, so both screens share them.

Why

Kriyon runs the user's own claude. Without it, a new user got a terminal that said "command not found" and no idea what to do next.

How I tested it

  • New tests: claude_cli (found, missing, unreadable PATH), spawn::on_path (the Unix rule, plus the Windows rule tested on any OS), the claudeCli store, and InstallClaudeScreen (Mac and Windows commands, Check again, Continue anyway).
  • pnpm check passes.
  • Not yet tried by hand: the screen in the real app on Mac and Windows. The Windows machine wasn't reachable today.

Stacked on #48. After #48 is squash-merged, rebase this branch onto dev and retarget it.

Checklist

  • The PR targets dev. (It targets feat/windows until feat(windows): run Kriyon on Windows #48 merges.)
  • I wrote or updated tests, and pnpm check passes.
  • I read and tested every line, and I can explain it in review.
  • AI tools wrote most of this change.

🤖 Generated with Claude Code

At launch Kriyon now checks whether the claude command a new session would
run is installed. It looks on the PATH a new session's shell gets, read
fresh: the person's shell PATH probed again on macOS, and on Windows the
PATH from their environment settings, which the PTY library reads for every
new session. So Check again sees a claude installed a minute ago without a
restart.

Only when nothing is found does the app show an install screen, after the
welcome screen. It gives Claude Code's own recommended install command for
that computer (from code.claude.com/docs/en/setup), how to confirm it
worked, how sign-in happens, and a link to fixing PATH. The active session
doesn't start while the screen shows. A PATH that can't be read counts as
unknown, never missing, and Continue anyway hides the screen for the run.

spawn::on_path only knew the Windows rule, trying each PATHEXT extension.
Off Windows a name is now the file itself, and only an executable one
counts, as the shell sees it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant