cortex update

Manage Cortex updates including checking for new versions, applying updates, rolling back, and configuring update channels. Supports both binary and source update modes.

Usage

cortex update --check                 # Check for available updates
cortex update --force                 # Apply latest update
cortex update --channel stable        # Switch to stable channel
cortex update --rollback              # Rollback to previous version
cortex update --status                # Show current version and channel info

Options

OptionDescription
--checkCheck for available updates without applying
--channelSet update channel (stable, pre)
--rollbackRollback to the previous installed version
--statusDisplay current version, channel, and update state
--forceForce apply update even if already on latest
--helpShow help for this command

Update Channels

ChannelDescription
stableProduction-ready releases with full testing
prePre-release builds with latest features

Update Modes

Binary Mode

Downloads pre-built binaries with SHA-256 verification and optional GPG signature validation. The binary is downloaded to ~/.cortex/updates/ and atomically replaced.

Source Mode

Pulls the latest source from the Cortex repository and rebuilds. Used when running from source or when binary mode is unavailable for the platform.

Configuration

The update system can be configured in the ~/.cortex/config.json file:

{
  "update": {
    "channel": "stable",
    "checkOnStartup": true,
    "autoUpdate": false,
    "checkIntervalHours": 24,
    "githubToken": "ghp_...",
    "gpgKeyPath": "/path/to/gpg/key"
  }
}

Verification

All updates are verified using:

  • SHA-256: Binary hash comparison against the release manifest
  • GPG Signatures: Optional GPG signature verification when gpgKeyPath is configured
  • Atomic Replacement: Updates are applied atomically to prevent corruption

Examples

# Check if an update is available
cortex update --check

# Apply the latest stable update
cortex update --force

# Switch to pre-release channel
cortex update --channel pre

# Rollback to previous version
cortex update --rollback

# View current version and channel
cortex update --status