# ox upgrade (https://sageox.ai/docs/cli/upgrade)

# ox upgrade

Detect how ox was installed and upgrade using the matching method: Homebrew, `go install`, or an in-place download that verifies and replaces the binary.

## Usage

<Terminal>
  <TerminalCommand>ox upgrade</TerminalCommand>
</Terminal>

## Examples

Pin the upgrade to a specific release tag instead of the latest:

<Terminal>
  <TerminalCommand>ox upgrade --target v0.18.0</TerminalCommand>
</Terminal>

Report the result as JSON:

<Terminal>
  <TerminalCommand>ox upgrade --json</TerminalCommand>
</Terminal>

## Flags

| Flag | Description |
|------|-------------|
| `--target <tag>` | Pin the upgrade to a specific version tag (e.g. `v0.18.0`); empty means the latest release from the GitHub releases API |
| `--json` | Output the result as JSON |

## What's next

- [ox version](/docs/cli/version) - Confirm the version after upgrading
- [ox release-notes](/docs/cli/release-notes) - See what changed in the new version
