Skip to content

Feature: Add 'clawatch update' command #55

@GalDayan

Description

@GalDayan

Problem

Users need a simple way to update clawatch to the latest version without manually running npm/yarn commands.

Proposed Solution

Add a clawatch update command that:

  • Checks for the latest version on npm
  • Shows current vs. latest version
  • Prompts to update if newer version available
  • Handles the update process automatically

User Story

As a clawatch user, I want to run clawatch update so that I can easily keep my CLI up to date without leaving the tool.

Acceptance Criteria

  • Command clawatch update exists
  • Shows current installed version
  • Fetches latest version from npm registry
  • Displays comparison (current vs. latest)
  • If up to date: shows "Already on latest version"
  • If outdated: prompts user to update (Y/n)
  • On Y: runs update command (npm/yarn global update)
  • Shows success/failure message
  • Works across npm, yarn, pnpm package managers

Edge Cases

  • What if user doesn't have npm/yarn/pnpm? → Show error with install instructions
  • What if registry is unreachable? → Graceful timeout + error message
  • What if user installed via npx? → Show message that update isn't applicable
  • Global vs. local install? → Detect install type, update accordingly

Open Questions

  • Should it support clawatch update --check (check only, no prompt)?
  • Should it auto-check on startup (like Homebrew)?
  • Version pinning support?

Priority

P2 (nice to have, improves DX)

Requested by: Anas Dweik

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions