Skip to content

refactor(cli): drop unused CLI compatibility facades - #305

Open
YosefHayim wants to merge 1 commit into
mainfrom
review/thin-cli-facades
Open

refactor(cli): drop unused CLI compatibility facades#305
YosefHayim wants to merge 1 commit into
mainfrom
review/thin-cli-facades

Conversation

@YosefHayim

@YosefHayim YosefHayim commented Aug 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Removes dead runInit / runDoctor / chooseAccountInteractive / setupIos re-exports from thin CLI modules.
  • Wizard and setup already call core programs directly; CLI stays Commander registration only.

Review focus

Finding 7 from the judgment review: keep src/cli as a thin boundary.

Test plan

  • Pre-commit typecheck + lint:style
  • CI green
  • Confirm no imports of removed facades (git grep only hits core program names)

Summary by cubic

Removes unused CLI compatibility facades so command modules only register commands and hand off to core programs. No user-facing changes.

  • Refactors
    • Deleted unused re-exports in src/cli/commands: runInit, runDoctor, chooseAccountInteractive, setupIos.
    • Kept doctor, creds, and init focused on Commander registration and runCliProgram only.

Written for commit 7622b65. Summary will update on new commits.

Review in cubic

Summary by CodeRabbit

  • Refactor
    • Streamlined credential, diagnostics, and initialization command handling.
    • Removed legacy guided command wrappers that were not part of the primary CLI workflows.
    • Preserved credential registration, adapter provisioning, diagnostics options, and initialization command registration.

Why: CLI modules should only register Commander commands and call core programs; wizard/setup already import core directly.
What: Remove runInit, runDoctor, chooseAccountInteractive, and setupIos re-exports from init/doctor/creds command modules.
Impact: No user-facing change; thinner CLI boundary for finding 7.
@changeset-bot

changeset-bot Bot commented Aug 4, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 7622b65

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codeant-ai

codeant-ai Bot commented Aug 4, 2026

Copy link
Copy Markdown

🤖 CodeAnt AI — Review Status

Status Commit Started (UTC) Finished (UTC)
✅ Reviewed your PR 7622b65 Aug 04, 2026 · 09:01 09:02

@codeant-ai

codeant-ai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai

coderabbitai Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 191d1135-5f91-4ff7-b45d-9f7d960702ea

📥 Commits

Reviewing files that changed from the base of the PR and between a57cdb1 and 7622b65.

📒 Files selected for processing (3)
  • src/cli/commands/creds.ts
  • src/cli/commands/doctor.ts
  • src/cli/commands/init.ts
💤 Files with no reviewable changes (2)
  • src/cli/commands/init.ts
  • src/cli/commands/creds.ts

📝 Walkthrough

Walkthrough

The CLI removes legacy credential, doctor, and init wrappers. Credential registration remains. The doctor command now maps required options and invokes doctorCommandProgram directly.

Changes

CLI command surface

Layer / File(s) Summary
Credentials and init wrapper removal
src/cli/commands/creds.ts, src/cli/commands/init.ts
The CLI removes the chooseAccountInteractive, setupIos, and runInit exports. Credential command registration remains.
Doctor direct invocation
src/cli/commands/doctor.ts
DoctorOptions now requires fix, yes, and json, makes platform optional, maps all four fields, and invokes doctorCommandProgram directly.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the removal of unused CLI compatibility facades, which matches the primary changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch review/thin-cli-facades

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Aug 4, 2026
@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

refactor(cli): drop unused CLI compatibility facade exports

✨ Enhancement 🕐 10-20 Minutes

Grey Divider

AI Description

• Removes unused compatibility re-exports from thin CLI command modules.
• Keeps src/cli focused on Commander registration + running core programs.
• Confirms wizard/setup paths already call core programs directly.
Diagram

graph TD
  A["Commander CLI"] --> B["src/cli/commands/*"] --> C["runCliProgram"] --> D["@core/* command programs"]
  E["Core wizard/setup"] --> D
  E -. "facades removed" .-> B
Loading
High-Level Assessment

This is the right direction: removing unused CLI facade exports keeps src/cli as a thin Commander boundary and prevents it from becoming an alternate API surface. A deprecation period isn’t necessary here because repository usage indicates wizard/setup already import the core programs directly.

Files changed (3) +1 / -51

Refactor (3) +1 / -51
creds.tsRemove creds compatibility facade exports +0/-21

Remove creds compatibility facade exports

• Drops 'chooseAccountInteractive' and 'setupIos' re-export wrappers (and the now-unused 'Platform' import) from the CLI creds module. The file continues to only register the Commander command and run the core credentials program with required providers.

src/cli/commands/creds.ts

doctor.tsRemove guided-setup 'runDoctor' facade and unused types +1/-26

Remove guided-setup 'runDoctor' facade and unused types

• Eliminates the 'runDoctor' helper and its option type that previously wrapped 'runDoctorProgram'. Simplifies imports to only what the Commander registration path needs ('DoctorCommandInput' and 'doctorCommandProgram').

src/cli/commands/doctor.ts

init.tsRemove guided-setup 'runInit' facade export +0/-4

Remove guided-setup 'runInit' facade export

• Removes the 'runInit' wrapper that executed init scaffolding without framing. The module now strictly attaches the init command to Commander and delegates to the core init program via the standard CLI runner.

src/cli/commands/init.ts

@qodo-code-review

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

To customize comments, go to the Qodo configuration screen, or learn more in the docs.

Qodo Logo

@cubic-dev-ai cubic-dev-ai Bot 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.

No issues found across 3 files

Re-trigger cubic

@YosefHayim YosefHayim added domain:cli Thin CLI command registration domain:foundation Shared kernel: tooling, services, types, style labels Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

domain:cli Thin CLI command registration domain:foundation Shared kernel: tooling, services, types, style size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant