Skip to content

CLI Overview

The ModernizeSpec CLI wraps the SDK for terminal use. It provides six commands covering the full modernization lifecycle.

Terminal window
# Use directly with npx (no install)
npx modernizespec <command>
# Install globally
npm install -g @modernizespec/cli
# Install as dev dependency
npm install -D @modernizespec/cli
CommandDescriptionPhase
initInteractive wizard to create .agents/modernization/Setup
analyzeScan codebase and suggest DDD mappingAnalysis
validateCheck compliance against JSON SchemasVerification
progressShow current extraction statusTracking
diffCompare legacy vs modern behaviorVerification
exportExport dashboard as HTML or JSONReporting
  1. init — Create the spec files (once)
  2. analyze — Scan the codebase for bounded contexts and complexity (periodic)
  3. validate — Verify spec files are correct (every commit)
  4. progress — Check extraction status (during work)
  5. diff — Compare legacy and modern behavior (after extraction)
  6. export — Generate reports for stakeholders (as needed)
FlagDescription
--dir <path>Target directory (default: current directory)
--verboseShow detailed output
--jsonOutput results as JSON (for piping)
--helpShow help for any command
--versionShow CLI version
CodeMeaning
0Command completed successfully
1Validation errors or command failure
2Spec files not found