You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli): Add upgrade command for CLI self-update
Add a new top-level `xcodebuildmcp upgrade` command that compares the
installed version against the latest GitHub release, detects the install
method (Homebrew, npm-global, npx, or unknown), shows a truncated
release-notes excerpt, and either runs the correct upgrade command with
inherited stdio or prints the manual command for unsupported channels.
Supports `--check` to report versions without prompting and `--yes`/`-y`
to skip the interactive confirmation for scripted use. Non-TTY callers
that could auto-upgrade but omit `--yes` exit with status 1 so scripts
do not hang.
Repo owner/name and package name are now emitted from the version
generator so the command reads them from package.json rather than
hardcoding. The command short-circuits in src/cli.ts to avoid the full
runtime bootstrap, mirroring `init` and `setup`.
Co-Authored-By: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6Lines changed: 6 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
# Changelog
2
2
3
+
## [Unreleased]
4
+
5
+
### Added
6
+
7
+
- Added `xcodebuildmcp upgrade` command to check for updates and upgrade in place. Supports `--check` (report-only) and `--yes`/`-y` (skip confirmation). Detects install method (Homebrew, npm-global, npx) and runs the appropriate upgrade command. Non-interactive environments exit 1 when an auto-upgrade is possible but `--yes` was not supplied.
The CLI uses a per-workspace daemon for stateful operations (log capture, debugging, etc.) that auto-starts when needed. See [docs/CLI.md](docs/CLI.md) for full documentation.
| npm global | Yes |`npm install -g xcodebuildmcp@latest`|
65
+
| npx | No | npx resolves `@latest` on each run; update the pinned version in your client config if needed. |
66
+
| Unknown | No | Manual instructions for all supported channels are shown. |
67
+
68
+
### Non-interactive mode
69
+
70
+
When stdin is not a TTY (CI, pipes, scripts):
71
+
72
+
-`--check` works normally and exits 0.
73
+
-`--yes` runs the upgrade for Homebrew and npm-global installs.
74
+
- Without `--check` or `--yes`, the command prints the manual upgrade command and exits 1 (it cannot prompt for confirmation).
75
+
76
+
### GitHub API failures
77
+
78
+
If the release check fails (network error, rate limit, timeout), the command prints the detected install method and manual upgrade instructions, then exits 1.
Copy file name to clipboardExpand all lines: docs/GETTING_STARTED.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,6 +62,16 @@ Using `@latest` ensures clients resolve the newest version on each run.
62
62
63
63
See [CLI.md](CLI.md) for full CLI documentation.
64
64
65
+
### Checking for updates
66
+
67
+
After installing, check for newer releases at any time:
68
+
69
+
```bash
70
+
xcodebuildmcp upgrade --check
71
+
```
72
+
73
+
Homebrew and npm-global installs can auto-upgrade with `xcodebuildmcp upgrade --yes`. npx users don't need to upgrade explicitly — `@latest` resolves the newest version on each run. If you pinned a specific version in your MCP client config, update the version there instead.
74
+
65
75
## Project config (optional)
66
76
For deterministic session defaults and runtime configuration, add a config file at:
0 commit comments