Skip to content

fix(cli): stop advertising multi-letter single-dash option aliases - #1395

Merged
kaoru0822-kitauji merged 1 commit into
mainfrom
fix/cli-long-option-aliases
Oct 10, 2026
Merged

kaoru0822-kitauji merged 1 commit into
mainfrom
fix/cli-long-option-aliases

Conversation

@kaoru0822-kitauji

Copy link
Copy Markdown
Collaborator

Problem

Incur's per-command alias map registers one-letter short flags: the parser reads -abc as the stacked flags -a -b -c. Incur also accepts the kebab-case spelling of every camelCase option, so --case-sensitive already works without any alias.

Twenty options across 12 commands registered their own kebab-case long name as an "alias" (for example caseSensitive: "case-sensitive"). As a result, --help (and generated completions) advertised spellings that the parser rejects:

$ rea search --help
  --case-sensitive, -case-sensitive  Match the pattern with exact letter case

$ rea search /bin/ls foo -case-sensitive
code: UNKNOWN
message: "Unknown flag: -c"

$ rea inspect-plist /Applications/XLD.app -relative-path Contents/Info.plist
code: UNKNOWN
message: "Unknown flag: -r"

Affected: analyze, analyze-javascript-application, inspect-artifact (-integrity-policy), search, trace (-case-sensitive), inspect-plist (-relative-path), decode-interface-builder (-max-documents/-objects/-connections), inspect-native-dispatch-metadata (-max-records), trace-native-values, trace-native-ui-action, capture-native-ui-scenario, observe-native-ui (-max-*, -window-id), and uninstall (-purge-data).

Change

  • Remove the redundant multi-letter alias entries (and one empty alias: {}). The real short flag setup -y is unchanged.
  • The --long-name spellings keep working through Incur's kebab-case normalization.

Tests

New tests/boundary/cli/cliOptionAliases.test.ts:

  • every registered alias on a primary command is a single character, and no --help output advertises a multi-letter single-dash flag (fails on main with all 20 entries listed);
  • --relative-path still parses without a registered alias.

Verification:

  • npm run test:focused -- tests/boundary/cli/*.test.ts (42 files, 200 passed)
  • npm run check:fast, npm run docs:check

No contract, schema or MCP change. No Hopper/Ghidra verification needed (CLI parsing only).

🤖 Generated with Claude Code

Incur's `alias` map registers one-letter short flags and already accepts
kebab-case spellings of camelCase options. Twenty options registered their
kebab-case long name as an "alias", so help and completions advertised
flags such as `-case-sensitive` and `-relative-path` that the parser reads
as stacked short flags and rejects with "Unknown flag: -c".

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Repo admins can enable using credits for code reviews in their settings.

@kaoru0822-kitauji
kaoru0822-kitauji merged commit 498cec0 into main Oct 10, 2026
19 checks passed
@kaoru0822-kitauji
kaoru0822-kitauji deleted the fix/cli-long-option-aliases branch October 10, 2026 02:29
darsrc pushed a commit to darsrc/rea that referenced this pull request Oct 10, 2026
…orluto#1395)

Incur's `alias` map registers one-letter short flags and already accepts
kebab-case spellings of camelCase options. Twenty options registered their
kebab-case long name as an "alias", so help and completions advertised
flags such as `-case-sensitive` and `-relative-path` that the parser reads
as stacked short flags and rejects with "Unknown flag: -c".
@morluto morluto added bug Something isn't working area: cli CLI adapter and one-shot commands labels Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli CLI adapter and one-shot commands bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants