Make update-readme.sh work without global mcpc install#258
Merged
Conversation
The update-readme script invoked the global `mcpc --help`; with no global install it captured empty output and silently wiped the auto-generated help block in README.md. Use the locally built CLI (`node bin/mcpc`) instead, building the project first if `dist/` is missing, and add `node_modules/.bin` to PATH so doctoc/markdown-link-check resolve even when the script is run directly. Also abort if the captured help output is empty, so a broken environment fails loudly instead of emptying the README block. https://claude.ai/code/session_014Vt5MvUcgyY6Dk8ZTqSM34
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates the
update-readme.shscript to work independently without requiring a globalmcpcinstallation or running throughpnpm run. This improves developer experience and makes the script more robust.Key Changes
node_modules/.binto PATH so project-local dev tools (doctoc, markdown-link-check) are resolvable when the script is run directlymcpccommand to using the locally built CLI vianode bin/mcpc, eliminating the need for a global installationdist/cli/index.jsis missing, ensuring the script works even on fresh clonesmcpc --helpproduces output before updating the README, preventing accidental data loss if the command fails silentlyImplementation Details
The script now:
node_modules/.bindirectory to PATH for tool resolutionnode "$MCPC_CLI"instead of the globalmcpccommandhttps://claude.ai/code/session_014Vt5MvUcgyY6Dk8ZTqSM34