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
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 nativecodenomad --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 install -g @neuralnomads/codenomad@<version>pnpm install -g @neuralnomads/codenomad@<version>bun install -g @neuralnomads/codenomad@<version>2. Version Resolution
codenomad --upgrade 0.10.3).3. Server vs. UI Updates
--upgradecommand specifically targets the CLI server package.resolveUiinpackages/server/src/ui/remote-ui.ts). The--upgradecommand 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