Skip to content

Rewrite README benefit-first and add the docs guide set - #8

Merged
dennisdornon merged 3 commits into
mainfrom
docs/readme-and-guides
Jul 24, 2026
Merged

Rewrite README benefit-first and add the docs guide set#8
dennisdornon merged 3 commits into
mainfrom
docs/readme-and-guides

Conversation

@dennisdornon

@dennisdornon dennisdornon commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Restyles the README on the pattern of the MCP server repo and splits the deep content into six guides under docs/.

What changed

  • README: branded header (2026 logo lockup, badges), a why-a-CLI section, quick start with the Application Password walkthrough, everyday commands, ability category tables, and a safety summary. 612 lines down to ~230.
  • New guides: getting-started, cli-reference, configuration, safety, chat, troubleshooting. Existing workflows/ and acceptance-testing are linked, untouched.
  • Images: logo lockup plus two cards rendered with the MainWP social kit (hero in the README, guard-rails card in the safety guide). Terminal content on the cards uses verified output strings only.

Review fixes folded in

A Codex documentation review ran against the working tree; every accepted finding is in this diff:

  • Update abilities (update-site-*, run-updates-*, update-all-*) are classified destructive by the name-based override, so the examples preview then confirm, with site_id_or_domain as the input key.
  • Preview wording no longer implies snapshot binding between dry-run and confirm (documented TOCTOU limitation).
  • Idempotent is defined as no additional effect, not a retry license.
  • Chat docs list everything the provider receives, including ability schemas sent as tool definitions.
  • Signal exits 130/143 documented; the Ctrl-C claim matches what jobs watch actually reports; batch queueing is described as the Dashboard's decision (no client-side threshold exists).
  • Reference tables gain the previously missing flags and environment variables.

Verification

  • All 20 externally-checkable doc claims verified against source with file:line evidence (flags, defaults, paths, audit/approval behavior, exit codes).
  • Every relative link and anchor in the README and guides resolves.
  • npm pack --dry-run: 229 files, no strays; docs/ stays out of the tarball, matching @mainwp/mcp. npmjs.com rewrites the README's relative links via the repository field.
  • Docs-only change: no source, packaging, or changelog edits.

Summary by CodeRabbit

  • Documentation
    • Reorganized the README into a CLI-focused guide with new sections for why CLI, quick start, everyday commands, configuration, abilities, safety, and updated license/contribution info.
    • Added dedicated docs for Chat (mainwpcontrol chat), Configuration (profiles/credentials and environment variables), Safety (preview/confirm guardrails for destructive actions), and Troubleshooting (doctor-based diagnosis and common failure fixes).
    • Added a Getting Started guide covering installation, application passwords, exit codes, and JSON input usage.
    • Added a comprehensive CLI Reference with subcommands, flags, shell completion, and exit-code contract.

Model the README on the MCP server repo: branded header, a why-a-CLI
section, quick start with the Application Password walkthrough, and
ability category tables. The deep content moves into six guides under
docs/ (getting started, CLI reference, configuration, safety, chat,
troubleshooting). Adds the 2026 logo lockup and two branded cards
rendered with the social kit; card terminal content uses verified
output strings only.

Folds in the Codex documentation review fixes:
- update-site-*, run-updates-*, and update-all-* are classified
  destructive by the name-based override, so the update examples now
  preview then confirm, with site_id_or_domain as the input key
- preview wording no longer implies snapshot binding between dry-run
  and confirm (the documented TOCTOU limitation)
- idempotent is defined as no additional effect, not a retry license
- chat docs list everything the provider receives, including ability
  schemas sent as tool definitions
- signal exits 130/143 documented; the Ctrl-C claim now matches what
  jobs watch actually reports; batch queueing is described as the
  Dashboard's decision with no client-side threshold
- reference tables gain the previously missing flags and environment
  variables (login --name/--password, chat --api-key/--base-url,
  config show --verbose, jobs watch polling flags, MAINWP_LLM_API_KEY,
  XDG_CONFIG_HOME)
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 30e10134-90f8-4461-a2f7-8549ba66ff07

📥 Commits

Reviewing files that changed from the base of the PR and between 3a4c817 and 2bddfa3.

📒 Files selected for processing (5)
  • README.md
  • docs/cli-reference.md
  • docs/getting-started.md
  • docs/safety.md
  • docs/troubleshooting.md
🚧 Files skipped from review as they are similar to previous changes (3)
  • docs/getting-started.md
  • docs/cli-reference.md
  • README.md

Walkthrough

The README is reorganized around CLI onboarding and links to expanded documentation. New pages document command usage, configuration, getting started, chat mode, safety controls, and troubleshooting.

Changes

CLI documentation

Layer / File(s) Summary
Onboarding and project overview
README.md, docs/getting-started.md, docs/troubleshooting.md
Reworks onboarding, configuration overview, contribution guidance, installation help, credential setup, command output, JSON input, and troubleshooting workflows.
CLI command reference
docs/cli-reference.md
Documents global flags, supported commands, shell completion, exit codes, and CI status handling.
Configuration and chat behavior
docs/configuration.md, docs/chat.md
Describes credential/profile storage, settings and environment variables, TLS options, chat providers, flags, payload handling, and non-interactive behavior.
Safety and destructive execution guidance
README.md, docs/safety.md
Documents ability classification, preview/confirmation requirements, audit logging, batch execution, uncertain outcomes, force mode, and chat safety parity.

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

Possibly related PRs

  • mainwp/mainwp-control#4: Both PRs document JSON input handling for abilities run in Windows PowerShell, including use of --input-file.
🚥 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 accurately summarizes the main documentation rewrite and the addition of the new docs guide set.
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
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/readme-and-guides

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 6

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/cli-reference.md`:
- Line 32: Update the --url entry in the CLI reference to document both
supported HTTPS bypasses: MAINWP_ALLOW_HTTP=1 and the allowInsecureHttp
configuration setting. Keep the existing requirement and wording concise while
aligning with the contract documented in configuration.md.

In `@docs/getting-started.md`:
- Line 45: Update the long-term storage guidance near the OS keychain and `.env`
recommendation to state that mainwpcontrol does not load `.env` files
automatically; users must source the file or export MAINWP_APP_PASSWORD into
process.env before running the CLI.

In `@docs/safety.md`:
- Line 66: Update the interrupt behavior description in the job-watching
documentation so Ctrl-C and SIGTERM stop or cancel only the watch, while
explicitly stating that the Dashboard job continues running and remains
resumable by job ID; preserve the exit codes and job ID reporting.
- Line 74: Update the “Non-destructive writes run without confirmation” guidance
in docs/safety.md to explicitly exempt or qualify plugin updates according to
the ability-specific confirmation rules for run-updates-* and update-all-*.
Ensure the wording no longer contradicts the destructive-class guidance and
preserves confirmation requirements for abilities that require them.

In `@docs/troubleshooting.md`:
- Around line 72-74: Update the “Still stuck?” troubleshooting guidance to
explicitly instruct users to redact usernames, Dashboard URLs, site identifiers,
and tokens from command output and diagnostics before opening an issue, rather
than referring only to credentials. Preserve the existing request for the
command, debug stderr, and doctor output.
- Around line 15-19: Update the “Use environment variable auth instead” section
in docs/troubleshooting.md to remove the claim that this approach bypasses
keytar. Clarify that MAINWP_APP_PASSWORD supplies the credential while login
still stores it through the keychain, and distinguish this from the explicit
MAINWPCONTROL_NO_KEYTAR=1 bypass.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e826b302-be28-4ecf-9aaa-2804651f6cc0

📥 Commits

Reviewing files that changed from the base of the PR and between f3996ef and 3a4c817.

⛔ Files ignored due to path filters (3)
  • docs/images/mainwp-control-fleet-from-the-terminal.png is excluded by !**/*.png
  • docs/images/mainwp-control-guard-rails.png is excluded by !**/*.png
  • docs/images/mainwp-control-logo-2026.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • README.md
  • docs/chat.md
  • docs/cli-reference.md
  • docs/configuration.md
  • docs/getting-started.md
  • docs/safety.md
  • docs/troubleshooting.md

Comment thread docs/cli-reference.md Outdated
Comment thread docs/getting-started.md Outdated
Comment thread docs/safety.md Outdated
Comment thread docs/safety.md Outdated
Comment thread docs/troubleshooting.md Outdated
Comment thread docs/troubleshooting.md Outdated
All six verified against source before changing anything:

- safety.md still said plugin updates run without confirmation in the
  guard-rails bullet; the name-based override classifies update-site-*,
  run-updates-*, and update-all-* destructive, so the bullet now lists
  only syncing and reconnecting
- interrupt wording now says Ctrl-C/SIGTERM stop the watch while the
  Dashboard job keeps running
- troubleshooting no longer claims env-var auth bypasses keytar; login
  still uses the keychain layer unless MAINWPCONTROL_NO_KEYTAR=1, so
  the recovery step sets both variables
- issue-report guidance asks for usernames, Dashboard URLs, and site
  identifiers to be removed, not just credentials
- getting-started notes the CLI does not read .env files itself
- login --url documents both HTTP escape hatches (MAINWP_ALLOW_HTTP=1
  and the allowInsecureHttp setting)
Local CodeRabbit run and an adversarial source-verification sweep over
the full branch diff, both run before pushing:

- the cron example alerts through a Slack webhook instead of an
  undefined notify command, matching the daily-health-check guide
- the abilities table states it counts built-in mainwp/* abilities and
  explains why the Quick Start sample shows 87 on a Dashboard with
  extensions installed
- shell completion examples use the real global install path via
  npm root -g
- the preview guarantee wording drops the antithesis construction
- profile delete is documented as interactive-only: no skip flag, and
  it cancels safely in non-interactive contexts
@dennisdornon
dennisdornon merged commit 4d3ebe8 into main Jul 24, 2026
9 checks passed
@dennisdornon
dennisdornon deleted the docs/readme-and-guides branch July 27, 2026 14:03
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.

1 participant