Skip to content

Create CLI interface with proper command parsing #14

Description

@jeremyfelt

Summary

Build a proper CLI interface to replace direct node script execution, supporting commands like 'npx reglance capture' and 'npm run reglance compare'.

Current Usage

node capture.mjs property
node compare.mjs property  
node control.mjs property

Target Usage

npx reglance capture property
npx reglance compare property
npx reglance control property

Tasks

  • Create bin/reglance.js as CLI entry point
  • Add command parsing (capture, compare, control commands)
  • Support global and local installation modes
  • Add help text and usage instructions
  • Implement proper argument validation
  • Add --help and --version flags
  • Support additional flags (--config, --verbose, --output, etc.)

CLI Features

  • Command help: reglance help, reglance capture --help
  • Version info: reglance --version
  • Config override: reglance capture --config ./custom.config.js
  • Output directory: reglance capture --output ./custom-output
  • Verbose logging: reglance capture --verbose
  • Dry run mode: reglance capture --dry-run

Error Handling

  • Clear error messages for invalid commands
  • Helpful suggestions for typos
  • Exit codes: 0 for success, 1 for errors
  • Proper error logging vs standard output

Acceptance Criteria

  • CLI works with npx reglance [command]
  • All existing functionality accessible via CLI
  • Help text is clear and comprehensive
  • Error messages are user-friendly
  • Supports both global and local installation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    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