CLI flags should not be case-sensitive (`apiops -v` fails, `-V` works)

Open
#224 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
58/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
node.js, typescript
Domain
cli

Research direction

Start at the TypeScript CLI argument-parsing entry point and reproduce the behavior with apiops -v and apiops -V in the reported environment. Trace how -V and --version are registered; done means lowercase -v also prints the installed version without breaking existing flags.

Written by the indexing model from the issue text.

Description

Bug effort:S P2
Command that triggered the bug

apiops -v

Expected behavior

Both apiops -v and apiops -V should print the installed CLI version. Users commonly expect short flags to be case-insensitive, and -v is the conventional lowercase form for "version" across most CLIs.

Actual behavior

Only apiops -V prints the version. apiops -v fails / is not recognized as the version flag. This is inconsistent and surprising for users.

Ideally, command-line short flags in general should not be case-sensitive — or at minimum, -v should be aliased to -V (and --version) for the version output.

apiops CLI version

0.4.0-alpha.1

Environment details
  • OS: Windows 11
  • Shell: PowerShell 7.6.3
  • Node.js: v24.0.1
  • npm: 11.11.0
CI/CD environment

N/A (running locally)

Is this bug blocking you?

No

Dominant language
TypeScript
Stars
29
Forks
10
Avg merge
1d 14h
Merged PRs (30d)
22

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Azure/apiops-cli

All issues in Azure/apiops-cli

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.