reload.sh: default to build-only, add --launch flag (#2097)

* reload.sh: default to build-only, add --launch flag to open app

By default, reload.sh now builds and prints the app path without
launching. Pass --launch to get the previous behavior (kill existing
instance and open). This lets agents build without stealing focus,
and the user can cmd-click the printed path to launch when ready.

* CLAUDE.md: use reload.sh output for app path instead of hardcoded home dir

The templates hardcoded /Users/lawrencechen/ which broke cmd-click
on machines with a different home directory. Agents now read the
actual path from reload.sh's "App path:" output.

* CLAUDE.md: add concrete example for app path URL format

Uses a fictional /Users/jane/ to make it clear the path comes from
reload.sh output, not a hardcoded value.

* CLAUDE.md: clearer step-by-step instructions for app path URL

Explicit 3-step recipe (grab path, prepend file://, format as link)
with example showing the reload.sh output and the expected result.

---------

Co-authored-by: Lawrence Chen <lawrencecchen@users.noreply.github.com>
This commit is contained in:
Lawrence Chen 2026-03-24 21:45:48 -07:00 committed by GitHub
parent 65867b86ee
commit 960006e6d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 115 additions and 76 deletions

View file

@ -24,17 +24,18 @@
- Build the GhosttyKit.xcframework from source
- Create the necessary symlinks
3. Build and run the debug app:
3. Build the debug app:
```bash
./scripts/reload.sh
./scripts/reload.sh --tag my-feature
```
The script prints the `.app` path. Cmd-click to open, or pass `--launch` to open automatically.
## Development Scripts
| Script | Description |
|--------|-------------|
| `./scripts/setup.sh` | One-time setup (submodules + xcframework) |
| `./scripts/reload.sh` | Build and launch Debug app |
| `./scripts/reload.sh` | Build Debug app (pass `--launch` to also open it) |
| `./scripts/reloadp.sh` | Build and launch Release app |
| `./scripts/reload2.sh` | Reload both Debug and Release |
| `./scripts/rebuild.sh` | Clean rebuild |