Skip to content

Conversation

@kamalrelwani
Copy link
Contributor

🚀 Add Extension Command Aliases

Summary

This PR introduces aliases for the subcommands to the extension module to provide shorter, more convenient ways to access frequently used extension commands.

Changes Made

  • Added aliases for all extension subcommands to improve developer workflow

New Command Aliases

Original Command New Alias(es) Description
fdk extension init fdk ext i Initialize extension
fdk extension preview-url fdk ext preview, fdk ext p Get extension preview URL
fdk extension launch-url fdk ext lu Launch URL commands
fdk extension launch-url get fdk ext lu g Get current launch URL
fdk extension launch-url set fdk ext lu s Set launch URL
fdk extension pull-env fdk ext pe Pull environment variables

Benefits

  • Better developer experience - More intuitive and concise commands across the entire extension module
  • Backward compatibility - All original commands continue to work unchanged
  • Comprehensive coverage - Aliases for all extension subcommands, not just the main command

Usage Examples

# Before
fdk extension init --template react
fdk extension preview-url --port 3000
fdk extension launch-url get --api-key abc123
fdk extension launch-url set --url https://example.com
fdk extension pull-env

# After (all work with new aliases)
fdk ext i --template react           # Much shorter init
fdk ext preview --port 3000          # Shorter preview
fdk ext p --port 3000                # Even shorter preview
fdk ext lu g --api-key abc123        # Compact launch URL get
fdk ext lu s --url https://example.com  # Compact launch URL set
fdk ext pe                           # Quick environment pull

Testing

  • ✅ Verified all existing functionality remains intact
  • ✅ Tested all new aliases work correctly with their respective options and flags
  • ✅ Confirmed help text displays both original and alias forms for all commands
  • ✅ Validated error handling works identically for both original and alias forms
  • ✅ Tested nested command aliases (launch-url subcommands)

Files Modified

  • src/commands/extension/extension-builder.ts - Added comprehensive .aliases() declarations for all extension commands

Breaking Changes

None - This is a purely additive feature that maintains full backward compatibility.

@kamalrelwani kamalrelwani marked this pull request as ready for review August 12, 2025 10:21
@vivek-gofynd vivek-gofynd merged commit 8e8d033 into gofynd:master Oct 3, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants