Conversation
Align the executable name with the product name "MainWP Control" for easier user recall. This is a clean pre-release break (0 users). Changes across 74 files: - package.json: bin, oclif.bin, oclif.dirname, identifier, s3 bucket - All source: mainwpctl→mainwpcontrol, MAINWPCTL→MAINWPCONTROL - Shell completions: file renames + content update - Docs: npx examples fixed to use --package=@mainwp/control form - npm paths corrected to @mainwp/control (was broken before rename) No migration. Testers must re-login after this change.
- .env.example: config dir comment still said ~/.config/mainwpctl - README.md: 3 references to MAINWPCTL_NO_KEYTAR (runtime uses MAINWPCONTROL_NO_KEYTAR) - docs/workflows/*.md: version output said mainwpcontrol/x.y.z but CLI prints @mainwp/control/x.y.z (oclif uses npm package name)
WalkthroughThis PR performs a comprehensive rename of the CLI executable name from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (7)
src/utils/errors.ts (1)
2-2: Documentation updated, but consider class name consistency.The module documentation correctly references
mainwpcontrol, but the base error class is still namedMainWPCTLError. Since this is a pre-release breaking change according to the PR summary, you may want to align the class name with the new CLI name for consistency.♻️ Optional: Rename error class for consistency
If you want full consistency with the new CLI name:
-export abstract class MainWPCTLError extends Error { +export abstract class MainWPControlError extends Error {This would require updating all references to
MainWPCTLErroracross the codebase. If intentionally keeping the old class name for internal abbreviation purposes, the current state is acceptable.Also applies to: 9-12
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/utils/errors.ts` at line 2, The base error class name MainWPCTLError is inconsistent with the new CLI name (mainwpcontrol); rename the class to MainWPControlError and update its export to match, then search and replace all references/usages of MainWPCTLError across the codebase (imports, instanceof checks, tests, and docs) to use MainWPControlError so names remain consistent with the updated documentation and CLI branding.src/lib/base-command.ts (1)
160-170: Prefer dynamic bin name in user hints to avoid future rename churn.Using
this.config.binhere would keep runtime guidance aligned automatically.♻️ Proposed refactor
private async loadProfile(profileName?: string): Promise<void> { const profileStore = getProfileStore(); + const bin = this.config.bin ?? 'mainwpcontrol'; if (profileName) { const profile = await profileStore.get(profileName); if (!profile) { throw new ConfigError( `Profile not found: ${profileName}`, undefined, - 'List available profiles with `mainwpcontrol profile list` or create one with `mainwpcontrol login`' + `List available profiles with \`${bin} profile list\` or create one with \`${bin} login\`` ); } this.currentProfile = profile; } else { this.currentProfile = await profileStore.getActive(); if (!this.currentProfile) { throw new ConfigError( 'No profile configured.', undefined, - 'Create your first profile with `mainwpcontrol login`' + `Create your first profile with \`${bin} login\`` ); } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/lib/base-command.ts` around lines 160 - 170, The user-facing hint messages in BaseCommand (where this.currentProfile is set and where a ConfigError is thrown) use a hardcoded CLI name; update those messages to reference the dynamic this.config.bin instead so runtime hints stay correct after renames — replace the literal "mainwpcontrol" occurrences in the messages around the currentProfile/profileStore.getActive logic with this.config.bin (ensure the same change is applied to both the 'profile list'/'login' hint and the 'Create your first profile' hint).docs/workflows/monitoring-integration.md (1)
85-88: Add language specifier to the fenced code block.The code block showing expected version output should have a language specifier for consistent formatting.
📝 Suggested fix
Expected output: -``` +```text `@mainwp/control/x.y.z` darwin-arm64 node-vNN.NN.N</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@docs/workflows/monitoring-integration.mdaround lines 85 - 88, Add a
language specifier to the fenced code block that contains the expected output
string@mainwp/control/x.y.z darwin-arm64 node-vNN.NN.Nso it renders
consistently (e.g., change the openingtotext); ensure the closing ```
remains and nothing else in the block is altered.</details> </blockquote></details> <details> <summary>scripts/completions/mainwpcontrol.bash (1)</summary><blockquote> `11-16`: **Consider renaming internal variable for consistency.** The internal variable `_MAINWPCTL_COMPLETION_DIR` still uses the old naming convention. While this doesn't affect functionality (it's not user-facing), renaming it to `_MAINWPCONTROL_COMPLETION_DIR` would improve consistency. <details> <summary>📝 Suggested fix</summary> ```diff # Determine the directory where this script is located -_MAINWPCTL_COMPLETION_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +_MAINWPCONTROL_COMPLETION_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" # Source the profile completer helper -if [[ -f "${_MAINWPCTL_COMPLETION_DIR}/profile-completer.sh" ]]; then - source "${_MAINWPCTL_COMPLETION_DIR}/profile-completer.sh" +if [[ -f "${_MAINWPCONTROL_COMPLETION_DIR}/profile-completer.sh" ]]; then + source "${_MAINWPCONTROL_COMPLETION_DIR}/profile-completer.sh" fi ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@scripts/completions/mainwpcontrol.bash` around lines 11 - 16, Rename the internal variable _MAINWPCTL_COMPLETION_DIR to _MAINWPCONTROL_COMPLETION_DIR throughout the script: update its declaration where it's set with cd/dirname and any subsequent references (e.g., the conditional that checks and sources "${_MAINWPCTL_COMPLETION_DIR}/profile-completer.sh") so they consistently use the new symbol _MAINWPCONTROL_COMPLETION_DIR. ``` </details> </blockquote></details> <details> <summary>docs/workflows/monthly-batch-updates.md (1)</summary><blockquote> `46-49`: **Optional: Add language specifier to code block.** The fenced code block showing the Application Password example lacks a language specifier. Adding `text` would satisfy the markdownlint MD040 rule. <details> <summary>📝 Add language specifier</summary> ```diff - ``` + ```text AbCD 1234 efGH 5678 ijKL 9012 ``` ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@docs/workflows/monthly-batch-updates.mdaround lines 46 - 49, The fenced
code block containing the Application Password example (the block with "AbCD
1234 efGH 5678 ijKL 9012") is missing a language specifier; update the markdown
by adding a language tag (use "text") after the opening backticks so the block
reads ```text to satisfy MD040 and make the snippet explicit.</details> </blockquote></details> <details> <summary>scripts/completions/mainwpcontrol.zsh (1)</summary><blockquote> `11-11`: **Inconsistent variable name: `_MAINWPCTL_COMPLETION_DIR` not renamed.** The variable on line 11 still uses the old `MAINWPCTL` prefix while all functions have been renamed to `_mainwpcontrol_*`. For consistency with the rename, this should be updated. <details> <summary>♻️ Rename variable for consistency</summary> ```diff # Determine the directory where this script is located -_MAINWPCTL_COMPLETION_DIR="${0:A:h}" +_MAINWPCONTROL_COMPLETION_DIR="${0:A:h}" # Source the profile completer helper -if [[ -f "${_MAINWPCTL_COMPLETION_DIR}/profile-completer.sh" ]]; then - source "${_MAINWPCTL_COMPLETION_DIR}/profile-completer.sh" +if [[ -f "${_MAINWPCONTROL_COMPLETION_DIR}/profile-completer.sh" ]]; then + source "${_MAINWPCONTROL_COMPLETION_DIR}/profile-completer.sh" fi ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@scripts/completions/mainwpcontrol.zsh` at line 11, Update the inconsistent variable name _MAINWPCTL_COMPLETION_DIR to match the new naming convention used by the functions (e.g., _mainwpcontrol_*): locate where _MAINWPCTL_COMPLETION_DIR is defined and rename it to _mainwpcontrol_completion_dir (or the project’s chosen snake-case/case style for _mainwpcontrol_) and update any references that use _MAINWPCTL_COMPLETION_DIR so they point to the new name (ensure consistency with functions like _mainwpcontrol_complete and any other _mainwpcontrol_* symbols). ``` </details> </blockquote></details> <details> <summary>scripts/completions/profile-completer.sh (1)</summary><blockquote> `9-10`: **Consider using POSIX-compliant syntax or updating the shebang.** The script uses `local` (line 10), which is not defined in POSIX `sh`. While this works fine when sourced by bash/zsh (the intended use case), the `#!/bin/sh` shebang is technically inconsistent. Options: 1. Change shebang to `#!/bin/bash` to match the bashism usage 2. Remove `local` if strict POSIX compliance is needed Since this script is only sourced by bash/zsh completion scripts, this is unlikely to cause runtime issues. <details> <summary>🔧 Option 1: Update shebang to bash</summary> ```diff -#!/bin/sh +#!/bin/bash # profile-completer.sh - Helper script to get available mainwpcontrol profile names ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@scripts/completions/profile-completer.sh` around lines 9 - 10, The function _mainwpcontrol_get_profiles uses the bash-only keyword local, so update the script shebang from #!/bin/sh to a bash-compatible interpreter (e.g. change to #!/usr/bin/env bash or #!/bin/bash) so the local declaration is valid when the script is executed/sourced; keep the local usage in _mainwpcontrol_get_profiles and any other functions that rely on bashisms to avoid refactoring to POSIX sh. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In@docs/workflows/monitoring-integration.md:
- Around line 85-88: Add a language specifier to the fenced code block that
contains the expected output string@mainwp/control/x.y.z darwin-arm64 node-vNN.NN.Nso it renders consistently (e.g., change the openingtotext); ensure the closing ``` remains and nothing else in the block is
altered.In
@docs/workflows/monthly-batch-updates.md:
- Around line 46-49: The fenced code block containing the Application Password
example (the block with "AbCD 1234 efGH 5678 ijKL 9012") is missing a language
specifier; update the markdown by adding a language tag (use "text") after the
opening backticks so the block reads ```text to satisfy MD040 and make the
snippet explicit.In
@scripts/completions/mainwpcontrol.bash:
- Around line 11-16: Rename the internal variable _MAINWPCTL_COMPLETION_DIR to
_MAINWPCONTROL_COMPLETION_DIR throughout the script: update its declaration
where it's set with cd/dirname and any subsequent references (e.g., the
conditional that checks and sources
"${_MAINWPCTL_COMPLETION_DIR}/profile-completer.sh") so they consistently use
the new symbol _MAINWPCONTROL_COMPLETION_DIR.In
@scripts/completions/mainwpcontrol.zsh:
- Line 11: Update the inconsistent variable name _MAINWPCTL_COMPLETION_DIR to
match the new naming convention used by the functions (e.g., mainwpcontrol):
locate where _MAINWPCTL_COMPLETION_DIR is defined and rename it to
_mainwpcontrol_completion_dir (or the project’s chosen snake-case/case style for
mainwpcontrol) and update any references that use _MAINWPCTL_COMPLETION_DIR so
they point to the new name (ensure consistency with functions like
_mainwpcontrol_complete and any other mainwpcontrol symbols).In
@scripts/completions/profile-completer.sh:
- Around line 9-10: The function _mainwpcontrol_get_profiles uses the bash-only
keyword local, so update the script shebang from #!/bin/sh to a bash-compatible
interpreter (e.g. change to #!/usr/bin/env bash or #!/bin/bash) so the local
declaration is valid when the script is executed/sourced; keep the local usage
in _mainwpcontrol_get_profiles and any other functions that rely on bashisms to
avoid refactoring to POSIX sh.In
@src/lib/base-command.ts:
- Around line 160-170: The user-facing hint messages in BaseCommand (where
this.currentProfile is set and where a ConfigError is thrown) use a hardcoded
CLI name; update those messages to reference the dynamic this.config.bin instead
so runtime hints stay correct after renames — replace the literal
"mainwpcontrol" occurrences in the messages around the
currentProfile/profileStore.getActive logic with this.config.bin (ensure the
same change is applied to both the 'profile list'/'login' hint and the 'Create
your first profile' hint).In
@src/utils/errors.ts:
- Line 2: The base error class name MainWPCTLError is inconsistent with the new
CLI name (mainwpcontrol); rename the class to MainWPControlError and update its
export to match, then search and replace all references/usages of MainWPCTLError
across the codebase (imports, instanceof checks, tests, and docs) to use
MainWPControlError so names remain consistent with the updated documentation and
CLI branding.</details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Organization UI **Review profile**: CHILL **Plan**: Pro **Run ID**: `f635644b-ec3f-4f27-a11b-756e34218041` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between c380258cd19c7edcab61ddbe927ec3629e1df506 and 01edfa2113cb0bfd8fb3e905b9ff9c09f35c9457. </details> <details> <summary>⛔ Files ignored due to path filters (1)</summary> * `package-lock.json` is excluded by `!**/package-lock.json` </details> <details> <summary>📒 Files selected for processing (73)</summary> * `.env.example` * `README.md` * `docs/workflows/daily-health-check.md` * `docs/workflows/input-from-file.md` * `docs/workflows/monitoring-integration.md` * `docs/workflows/monthly-batch-updates.md` * `docs/workflows/plugin-deployment-verification.md` * `package.json` * `scripts/completions/README.md` * `scripts/completions/mainwpcontrol.bash` * `scripts/completions/mainwpcontrol.zsh` * `scripts/completions/profile-completer.sh` * `scripts/completions/regenerate.sh` * `src/__tests__/e2e/command-workflows.test.ts` * `src/__tests__/e2e/exit-codes.test.ts` * `src/__tests__/e2e/json-contract.test.ts` * `src/__tests__/e2e/login-abilities-flow.test.ts` * `src/__tests__/e2e/non-tty-behavior.test.ts` * `src/__tests__/process/abilities-info.test.ts` * `src/__tests__/process/abilities-list.test.ts` * `src/__tests__/process/abilities-run.test.ts` * `src/__tests__/process/auth.test.ts` * `src/__tests__/process/batch-wait.test.ts` * `src/__tests__/process/doctor.test.ts` * `src/__tests__/process/exit-codes.test.ts` * `src/__tests__/process/fixtures/cli-runner.ts` * `src/__tests__/process/fixtures/config-dir.ts` * `src/__tests__/process/global-flags.test.ts` * `src/__tests__/process/live-api.test.ts` * `src/__tests__/process/live-workflow-docs.test.ts` * `src/__tests__/process/scenarios.test.ts` * `src/__tests__/process/smoke.test.ts` * `src/chat/chat-engine.test.ts` * `src/chat/chat-engine.ts` * `src/chat/providers/anthropic.ts` * `src/chat/providers/gemini.ts` * `src/chat/providers/local.ts` * `src/chat/providers/openai.ts` * `src/chat/providers/openrouter.ts` * `src/chat/providers/provider.ts` * `src/chat/system-prompt.ts` * `src/chat/tool-envelope.ts` * `src/commands/abilities/info.ts` * `src/commands/abilities/list.ts` * `src/commands/abilities/run.ts` * `src/commands/chat.ts` * `src/commands/config/show.ts` * `src/commands/doctor.ts` * `src/commands/jobs/watch.ts` * `src/commands/login.ts` * `src/commands/profile/delete.ts` * `src/commands/profile/list.ts` * `src/commands/profile/use.ts` * `src/config/keychain.ts` * `src/config/profile-store.ts` * `src/config/settings.ts` * `src/core/abilities-executor.ts` * `src/core/batch-manager.ts` * `src/core/http-client.ts` * `src/core/safety-controller.ts` * `src/lib/base-command.ts` * `src/output/formatter.ts` * `src/output/json-envelope.ts` * `src/utils/audit-logger.ts` * `src/utils/colors.ts` * `src/utils/errors.ts` * `src/utils/exit-codes.ts` * `src/utils/format.ts` * `src/utils/prompt.ts` * `src/utils/retry.ts` * `src/utils/terminal-sanitizer.ts` * `src/validation/input-sanitizer.ts` * `src/validation/schema-validator.ts` </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Renames the CLI binary and all references from
mainwpctltomainwpcontrolto align with the product name.Changes across 74 files:
mainwpctl→mainwpcontrol~/.config/mainwpctl→~/.config/mainwpcontrolMAINWPCTL_NO_KEYTAR→MAINWPCONTROL_NO_KEYTARBuild passes, 663/663 tests pass, lint clean.
Note: testers should re-run
mainwpcontrol loginafter pulling this.Summary by CodeRabbit
Refactor
mainwpctltomainwpcontrolacross the application.~/.config/mainwpctlto~/.config/mainwpcontrol.MAINWPCTL_NO_KEYTARtoMAINWPCONTROL_NO_KEYTAR.Documentation
Tests
Chores