Skip to content

[QOL Feature] Add --upgrade command to server CLI #142

@VooDisss

Description

@VooDisss

Description

Currently, upgrading the CodeNomad CLI server requires users to manually look up the installation command (e.g., npm install -g @neuralnomads/codenomad) and execute it. We need a native codenomad --upgrade [version] command to streamline this process across various environments and package managers.

Technical Requirements

The upgrade mechanism should be inspired by the implementation in opencode (packages/opencode/src/installation/index.ts), which includes:

1. Installation Method Detection

The server should detect how it was installed to choose the correct upgrade path. Potential methods to support:

  • NPM: npm install -g @neuralnomads/codenomad@<version>
  • PNPM: pnpm install -g @neuralnomads/codenomad@<version>
  • Bun: bun install -g @neuralnomads/codenomad@<version>

2. Version Resolution

  • If no version is provided, the command should fetch the latest stable version from the NPM registry.
  • Support for specific versions (e.g., codenomad --upgrade 0.10.3).

3. Server vs. UI Updates

  • Server: The --upgrade command specifically targets the CLI server package.
  • UI: The server already has some UI auto-update logic (resolveUi in packages/server/src/ui/remote-ui.ts). The --upgrade command should primarily be used when a notification (e.g., in the web UI) explicitly tells the user that a server update is required for compatibility or critical bug fixes.

Proposed Command API

# Upgrade to latest
codenomad --upgrade

# Upgrade to specific version
codenomad --upgrade 0.10.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions