Skip to content

Add specify check --latest #2573

@PascalThuet

Description

@PascalThuet

Follow-up to #2498, #2519, #2548, and #2549.

Problem

specify check verifies local tools, but it does not tell users whether their installed specify CLI is outdated.

This matters because some integration features depend on the CLI version. If a user has an old local CLI, a feature can look unsupported even though it exists in newer releases.

Users can run specify self check today, but specify check is the command they are likely to use when diagnosing their setup.

Proposal

Add:

specify check --latest

Rules:

  • specify check stays offline by default.
  • specify check --latest performs the latest-release lookup.
  • Reuse the same lookup, version comparison, and failure handling as specify self check.
  • If an update is available, print the same upgrade command as specify self check.

Example when an update is available:

Specify CLI
Installed: 0.8.2
Latest release: 0.8.8
Update available: yes

To upgrade:
  uv tool install specify-cli --force \
    --from git+https://github.com/github/spec-kit.git@v0.8.8

Example when the lookup fails:

Specify CLI
Installed: 0.8.2
Could not check latest release: offline or timeout

Why not make this default?

specify check should remain fast and offline unless the user asks for a network check.

Tests

Add tests for:

  • specify check does not call the network by default;
  • specify check --latest reports up-to-date;
  • specify check --latest reports update available;
  • specify check --latest handles unknown installed version;
  • specify check --latest handles offline or rate-limit failures.

Tests should mock the latest-release lookup and not call the real GitHub API.

Suggested command:

pytest tests/test_check_tool.py tests/test_upgrade.py -v

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