Skip to content

Add version flag and welcome message display #22

@bvdr

Description

@bvdr

Summary

Add version flag support and improve welcome messages displayed after installation and when running the CLI without arguments.

Features

1. Version Flag Support

  • j -v - Display current version number
  • j --version - Display current version number

2. Welcome Message Improvements

  • Show version number in welcome messages
  • Display formatted welcome message after npm install
  • Improve first-run user experience

Implementation Details

Files Modified

  1. index.js

    • Added version flag handling (-v, --version)
    • Created showWelcomeMessage() function for consistent welcome display
    • Updated help and empty command displays to include version info
  2. scripts/postinstall.js

    • Added showWelcome() function with formatted ASCII box
    • Display welcome message at start of postinstall process
    • Improved visual presentation of getting started instructions

Benefits

  • Users can quickly check installed version (j -v)
  • Better onboarding experience with clear welcome messages
  • Consistent messaging across different entry points
  • Version visibility without requiring --help flag

Acceptance Criteria

  • j -v displays version number only
  • j --version displays version number only
  • Welcome message shown after npm install
  • Welcome message includes version information
  • All commands work without errors

Related

Improves user experience and follows CLI best practices for version display.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions