Upgrade
github-code-search includes a self-upgrade command that downloads and replaces the binary in-place.
Auto-upgrade
github-code-search upgradeThe command:
- Fetches the latest release from GitHub.
- Compares it against the currently running version.
- If a newer version is available, downloads the matching binary for your OS and architecture and replaces the currently running binary.
- Prints the new version string on success.
$ github-code-search upgrade
Checking for updates…
Already up to date (v1.2.0).$ github-code-search upgrade
Checking for updates…
Upgrading v1.2.0 → v1.3.0…
Successfully upgraded to v1.3.0.Token requirement
The upgrade subcommand works without a GITHUB_TOKEN. A token is used only if the GITHUB_TOKEN environment variable is already set (to avoid GitHub API rate limiting on the release fetch).
Checking the current version
github-code-search --version
# → 1.2.0 (abc1234 · darwin/arm64)The version string includes the git commit SHA, OS, and architecture of the compiled binary.
Troubleshooting
If the upgrade reports success but the version still shows the old value, or if you see no output after "Upgrading…", re-run with --debug for verbose diagnostics:
github-code-search upgrade --debugThis prints:
process.execPathand the resolved binary path (selfPath) that will be replaced- The list of available release assets and which one was selected
- HTTP response status and downloaded byte count
- Result of each file operation (write, chmod, mv)
macOS Gatekeeper
The upgrade subcommand automatically removes the macOS quarantine attribute (com.apple.quarantine) from the downloaded binary before replacing the existing one, so Gatekeeper will not block it on the next run.
If you downloaded the binary manually via a browser and see the Gatekeeper dialog, run once:
xattr -d com.apple.quarantine /path/to/github-code-searchManual upgrade
If the auto-upgrade fails (e.g. write permission denied), you can upgrade manually using the install script:
curl -fsSL https://raw.githubusercontent.com/fulll/github-code-search/main/install.sh | bashTo install a specific version:
VERSION=vX.Y.Z curl -fsSL \
https://raw.githubusercontent.com/fulll/github-code-search/main/install.sh | bashTo install to a custom directory:
INSTALL_DIR=~/.local/bin curl -fsSL \
https://raw.githubusercontent.com/fulll/github-code-search/main/install.sh | bash