Skip to content

feat: command refactor#107

Merged
BCsabaEngine merged 12 commits into
mainfrom
feat/commands
Apr 28, 2026
Merged

feat: command refactor#107
BCsabaEngine merged 12 commits into
mainfrom
feat/commands

Conversation

@BCsabaEngine

Copy link
Copy Markdown
Owner

No description provided.

This was referenced Apr 27, 2026
@BCsabaEngine BCsabaEngine requested a review from Copilot April 27, 2026 21:05

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the CLI from a flag-driven interface into explicit subcommands (run, diff, validate, format, suggest, list-files, show-config), updates the main orchestrator and tests accordingly, and refreshes docs/examples to match the new command structure.

Changes:

  • Refactor CLI parsing to Commander subcommands and update unit tests to assert per-command option sets.
  • Update runtime flow in src/index.ts to branch on commandName (new early exits, new diff command path, validate --strict exit code).
  • Update README/FAQ/CONTRIBUTING/CLAUDE and example docs/scripts to the new CLI usage; bump @typescript-eslint/eslint-plugin.

Reviewed changes

Copilot reviewed 19 out of 20 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
test/commandLine.test.ts Reworks CLI parsing tests around new subcommands and option sets.
src/index.ts Switches orchestration logic to commandName; adds strict validation exit code handling and new diff behavior.
src/exitCodes.ts Adds EXIT_VALIDATION_WARNINGS for validate --strict.
src/commandLine.ts Implements Commander subcommands and shared option parsing/validation helpers.
package.json Bumps @typescript-eslint/eslint-plugin patch version.
package-lock.json Lockfile updates for the eslint-plugin bump and related packages.
example/7-format-only/config.yaml Updates usage comment to new format command.
example/7-format-only/README.md Updates format-only example commands to subcommand syntax.
example/5-external-files/README.md Updates usage snippets to new diff/run/validate/list-files commands.
example/4-prune-mode/README.md Updates usage snippets to new diff/run commands and wording.
example/3-multi-env-chain/sync-all.sh Updates scripted invocations to diff (preview) and run (apply).
example/3-multi-env-chain/README.md Updates walkthrough commands to diff and run.
example/2-stop-rules/README.md Updates stop-rule example commands to diff and run.
example/1-config-inheritance/README.md Updates inheritance example commands to diff and run.
example/0-basic/config-minimal.yaml Updates comment to refer to suggest command wording.
example/0-basic/README.md Updates basic example commands to diff/run.
README.md Major documentation rewrite for subcommands, options tables, examples, and new exit code 4.
FAQ.md Updates FAQ guidance/examples to subcommands and documents validate --strict.
CONTRIBUTING.md Updates repo layout, scripts, test commands, architecture notes, and exit codes section.
CLAUDE.md Updates CLI and architecture notes to subcommands and strict validation exit code.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/commandLine.ts
Comment thread src/index.ts Outdated
Comment thread example/7-format-only/README.md
@BCsabaEngine BCsabaEngine merged commit 85bfca2 into main Apr 28, 2026
2 checks passed
@BCsabaEngine BCsabaEngine deleted the feat/commands branch April 28, 2026 05:37
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