Skip to content

Add SessionStart hook to auto-install deps#1

Draft
leap21ai wants to merge 2 commits into
mainfrom
claude/github-removal-local-setup-1RqrI
Draft

Add SessionStart hook to auto-install deps#1
leap21ai wants to merge 2 commits into
mainfrom
claude/github-removal-local-setup-1RqrI

Conversation

@leap21ai
Copy link
Copy Markdown
Owner

@leap21ai leap21ai commented May 30, 2026

What

Two things that make the repo turnkey to run on your own machine (laptop / Mac mini) instead of a cloud sandbox:

  1. A SessionStart hook that auto-installs the pnpm workspace before the agent starts (web and claude remote-control sessions).
  2. A docs/local-setup.md capturing the local dev workflow + Remote Control steps.

Changes

  • .claude/hooks/session-start.sh — enables corepack, pins pnpm@8.15.9 (matching packageManager), runs pnpm install. Idempotent, non-interactive.
  • .claude/settings.json — registers the hook on SessionStart.
  • .gitignore — narrows the .claude rule so the shared hook + settings.json are tracked while settings.local.json stays ignored.
  • docs/local-setup.md — prerequisites (Node 22+, pnpm via corepack), install/verify, AI key, and Remote Control (steer a local session from the Claude app, no GitHub needed). Linked from the README docs list.

Validation

Ran in this environment:

  • Hook: pnpm install completed (234 packages). Also confirmed live — the hook ran cleanly on a session resume.
  • Lint: biome check on a core source file — clean.
  • Test: vitest run on packages/core/src/__tests__/paths.test.ts — 11/11 passed.

Notes

  • Hook runs synchronously — guarantees deps are ready before the session starts (no race), at the cost of slightly slower startup. Can switch to async if preferred.
  • Once merged to the default branch, all future sessions pick it up.
  • The "Choose environment" picker in the app is cloud-only and always uses GitHub; Remote Control (claude remote-control) is the path that runs on your own hardware — documented in docs/local-setup.md.

claude added 2 commits May 30, 2026 14:11
Installs the pnpm workspace (pinned pnpm 8.15.9 via corepack) so tests
and linters are ready when a Claude Code on the web or remote-control
session starts. Untrack only the shared hook + settings.json; keep
settings.local.json ignored.
Documents prerequisites (Node 22+, pnpm 8.15.9 via corepack), install +
verify steps, the AI provider key, and Remote Control for steering a
local session from the Claude app without a GitHub connection. Linked
from the README docs list.
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.

2 participants