Skip to main content

CLI Commands

update

The update command updates the Cogni+ CLI to the latest version.

Usage

cogni update [OPTIONS]

Description

The update command checks for updates to the Cogni+ CLI and installs the latest version if available. It preserves your configuration during the update process, ensuring a seamless transition to the new version. This command helps you stay up to date with the latest features, improvements, and bug fixes.

Options

OptionDescription
--forceForce update even if already at the latest version
--helpShow help message for the update command

Update Process

  1. The command checks the currently installed version
  2. It queries the Cogni+ server for the latest available version
  3. If a newer version is available, it downloads the installer
  4. The installer replaces the CLI executable while preserving configuration
  5. The command verifies the new installation is successful

Examples

# Update to the latest version if available
cogni update

# Force update even if already at the latest version
cogni update --force

Output

When an update is available:
Cogni+ CLI v1.2.3
Checking for updates...
New version available: v1.3.0
Downloading update...
Installing...
Update complete! You are now using Cogni+ CLI v1.3.0
When already at the latest version:
Cogni+ CLI v1.3.0
Checking for updates...
You are already running the latest version.
When forcing an update:
Cogni+ CLI v1.3.0
Checking for updates...
You are already running the latest version.
Forcing update as requested...
Downloading update...
Installing...
Update complete! You are now using Cogni+ CLI v1.3.0
  • cogni version - Display the current version and check for updates

Tips

  • Run this command regularly to ensure you have the latest features and bug fixes
  • Configuration settings are preserved during updates
  • The update process requires an internet connection
  • You may need administrative privileges depending on your installation location