ld-find-code-refs icon indicating copy to clipboard operation
ld-find-code-refs copied to clipboard

Implement alias command with local and API-connected modes

Open InTheCloudDan opened this issue 4 months ago • 0 comments

  • Add new 'alias' command to CLI with --flag-key flag for local mode
  • Create AliasOptions struct with conditional validation logic
  • Implement GenerateAliases function supporting both modes:
    • Local mode: generates aliases for single flag key without API
    • API mode: fetches all flags from LaunchDarkly and generates aliases
  • Add InitYAMLForAlias to handle configuration without strict preconditions
  • Default dir to current working directory when not specified
  • Add comprehensive tests for alias options validation
  • Update existing tests to reflect new dir defaulting behavior

The alias command now works in two modes:

  1. Local: ld-find-code-refs alias --flag-key my-flag
  2. API: ld-find-code-refs alias --accessToken <token> --projKey <project>

InTheCloudDan avatar Jul 25 '25 18:07 InTheCloudDan