Repository navigation
docs(readme): lead with npx as the install-free entry point #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: protonspy/spec-claude-code
Length of output: 5110
🏁 Script executed:
Repository: protonspy/spec-claude-code
Length of output: 5034
🏁 Script executed:
Repository: protonspy/spec-claude-code
Length of output: 348
🌐 Web query:
npm npx documentation local dependencies prompt --yes cache install latest behavior💡 Result:
In modern npm (v7.0.0 and later), the npx command functions as a wrapper around npm exec [1][2]. Its behavior regarding local dependencies, cache, and user prompts is summarized below: Local Dependencies and Installation npx first attempts to use binaries available in the local project's node_modules/.bin [1][3]. If a requested package is not present in the local dependencies, npx will install the package to the npm cache and add it to the PATH of the executed process [1][4]. Matching Logic - When a package is specified without a version or specifier, npx matches it with the version existing in the local project if available [1][5]. - If a specific version or specifier is provided, npx only considers it a match if it perfectly matches the local dependency [1][3]. - If no match is found, or if you explicitly request a package via --package, npx installs the required package from the registry [1][3]. Prompting and --yes To prevent accidental execution of incorrect or malicious packages (e.g., due to typos), npx will prompt for confirmation before installing any package that is not already present [1][6]. - You can suppress this interactive prompt by using the --yes (or -y) flag [1][2]. - Providing --yes effectively tells npx to proceed with the installation automatically [1][3]. Caching Packages that are not found locally and require installation are fetched and stored in the npm cache, which is then made available to the executed process [1][4]. Note on Modern vs. Legacy Behavior The standalone npx package was deprecated in npm v7.0.0 [1][2]. Modern npx uses npm exec, which replaced the previous, separate installation logic [1][4]. Older flags like --no-install are deprecated and converted to --no, and --ignore-existing has been removed, as local bins are now always included in the PATH [1][2][4].
Citations:
🏁 Script executed:
Repository: protonspy/spec-claude-code
Length of output: 281
🏁 Script executed:
Repository: protonspy/spec-claude-code
Length of output: 4428
🏁 Script executed:
Repository: protonspy/spec-claude-code
Length of output: 4373
Make the
npxexamples accurate and CI-safe.npxcan resolve a matching local dependency or fetch the package into npm’s cache, so “No install” and “always the latest” are misleading. Use “No global install is required,” remove the “always the latest” claim, and add--yesto the pinned CI command.🤖 Prompt for AI Agents