Skip to content

@modernizespec/cli

@modernizespec/cli is the command-line interface for ModernizeSpec. It wraps @modernizespec/sdk for terminal use, providing commands for initialization, analysis, validation, progress tracking, parity diffing, and export.

Terminal window
# Use directly with npx (no install needed)
npx modernizespec <command>
# Or install globally
npm install -g @modernizespec/cli
# Or install as a dev dependency
npm install -D @modernizespec/cli
CommandDescription
initInteractive wizard to create .agents/modernization/
analyzeScan codebase and suggest DDD mapping
validateCheck file compliance against JSON Schemas
progressShow extraction status
diffCompare legacy vs modern behavior
exportExport dashboard as HTML or JSON
Terminal window
npx modernizespec init # Interactive wizard → generates files
npx modernizespec analyze # Scans codebase → suggests DDD mapping
npx modernizespec validate # Checks file compliance against schemas
npx modernizespec progress # Shows extraction status
npx modernizespec diff # Compares legacy vs modern behavior
npx modernizespec export --format html # Dashboard export

The CLI is a thin wrapper around the SDK. Every CLI command maps to an SDK method:

CLI CommandSDK Method
modernizespec initModernizeSpec.init(options)
modernizespec analyzeModernizeSpec.analyze(dir, options)
modernizespec validatespec.validate()
modernizespec progressspec.migrationState (read)
modernizespec diffspec.parity.compare()
modernizespec exportspec.export(format)

If you need programmatic access, use the SDK directly. The CLI is for interactive terminal use.

Each command has its own reference page:

  • init — Create .agents/modernization/ with interactive wizard
  • analyze — Scan codebase and suggest bounded contexts
  • validate — Check compliance against JSON Schemas
  • progress — Show current extraction status
  • diff — Compare legacy and modern behavior
  • export — Export as HTML dashboard or JSON