Skip to content

CLI --version reports 0.1.0 instead of actual package version #7

@johnwaldo

Description

@johnwaldo

Bug

dspyground --version always reports 0.1.0 regardless of the actual installed version. The version string is hardcoded in the CLI entry point instead of being read from package.json.

Steps to Reproduce

npm install -g dspyground@latest
npm list -g dspyground
# └── dspyground@0.3.10

dspyground --version
# 0.1.0

Root Cause

In the built CLI entry point (dist/cli/index.mjs), the version is hardcoded:

program.name("dspyground").description("DSPyGround - Optimize and test your AI agents").version("0.1.0");

This should read the version from package.json instead, e.g.:

import { createRequire } from 'module';
const require = createRequire(import.meta.url);
const { version } = require('../../package.json');

program.name("dspyground").description("...").version(version);

Or if using a bundler, inject the version at build time.

Impact

Any tooling that checks dspyground --version to determine if an update is needed will perpetually report an update is available (0.1.0 → 0.3.10), even though the package is already at the latest version. This creates an infinite update loop in automated version checkers.

Environment

  • dspyground npm package version: 0.3.10
  • dspyground CLI reported version: 0.1.0
  • Node.js: v22
  • macOS (Apple Silicon)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions