update command downloads and installs the latest ap-query release from GitHub, replacing the current binary with the new version.
Usage
What it does
Theupdate command:
- Checks for updates - Queries GitHub API for the latest release
- Downloads the binary - Fetches the appropriate archive for your OS/architecture
- Verifies checksums - Validates integrity using SHA256 checksums
- Replaces the binary - Atomically updates the current executable
- Regenerates skills - Updates globally installed agent skills automatically
The update is atomic - if anything fails, your current binary remains unchanged.
Examples
Standard update
Update to the latest release:Force update from dev build
Force update even if you’re running a development build:Flags
Force update even for dev or
go install builds.By default, update refuses to replace dev builds or Go-installed binaries. Use --force to override.Installation detection
Theupdate command detects how ap-query was installed:
Release binary
Standard installation (viacurl | sh or manual download):
go install
Installed viago install github.com/jerrinot/ap-query@latest:
Development build
Built from source (version shows “dev”):--force to replace with a release.
Skill regeneration
After updating,update automatically regenerates any globally installed agent skills:
~/.claude/skills/jfr/SKILL.md(Claude Code)~/.codex/skills/jfr/SKILL.md(Codex)
Project-local skills (
.claude/ or .agents/ in your project) are not automatically updated. Re-run ap-query init --project --force to update them.Version checking
Check your current version and see if updates are available:Network requirements
Theupdate command requires internet access to:
- Query GitHub API:
https://api.github.com/repos/jerrinot/ap-query/releases/latest - Download release archive:
https://github.com/jerrinot/ap-query/releases/download/...
https_proxy environment variable is set.
Platform support
Theupdate command downloads the correct binary for your platform:
- Linux:
ap-query_linux_amd64.tar.gz,ap-query_linux_arm64.tar.gz - macOS:
ap-query_darwin_amd64.tar.gz,ap-query_darwin_arm64.tar.gz - Windows:
ap-query_windows_amd64.zip,ap-query_windows_arm64.zip
runtime.GOOS and runtime.GOARCH.
Rollback
If you need to revert to a previous version:- Download the old release from GitHub releases
- Extract and replace the binary manually
- Run
ap-query init --forceto regenerate skills
Troubleshooting
Update fails with checksum mismatch
Update fails with checksum mismatch
The downloaded archive doesn’t match the expected SHA256. This usually indicates:
- Network corruption during download
- Incomplete download
- Proxy interference
Permission denied replacing binary
Permission denied replacing binary
The current binary location requires elevated permissions. Options:
- Run with
sudo:sudo ap-query update(not recommended) - Reinstall to user directory: Download to
~/binand add to PATH - Use
go installinstead for user-local installation
Update says already latest version
Update says already latest version
You’re already running the latest release. To force a reinstall:
Cannot update go install build
Cannot update go install build
If you installed with Or switch to release binaries with
go install, update via Go:--force.See also
- version - Check current version and available updates
- init - Install agent skills
- Installation - Initial installation instructions