Skip to content

feat(cli): implement vpx command for local-first package execution#578

Merged
fengmk2 merged 3 commits intomainfrom
vpx
Feb 10, 2026
Merged

feat(cli): implement vpx command for local-first package execution#578
fengmk2 merged 3 commits intomainfrom
vpx

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Feb 10, 2026

Add vpx as a standalone binary (symlink to vp) that checks local
node_modules/.bin first, then falls back to vp dlx for remote
download. This is analogous to how npx works.

  • Local binary lookup walks up from cwd checking node_modules/.bin
  • Version specs (e.g., eslint@9) skip local lookup and go remote
  • Supports --package/-p, --shell-mode/-c, --silent/-s flags
  • Shim created by vp env setup alongside node/npm/npx
  • On Windows, uses vp env exec vpx pattern like other shims

@fengmk2 fengmk2 self-assigned this Feb 10, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 marked this pull request as ready for review February 10, 2026 08:38
Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yesss!

Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 10, 2026

Merge activity

  • Feb 10, 9:01 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 10, 9:02 AM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 10, 9:10 AM UTC: @fengmk2 merged this pull request with Graphite.

Add `vpx` as a standalone binary (symlink to `vp`) that checks local
`node_modules/.bin` first, then falls back to `vp dlx` for remote
download. This is analogous to how `npx` works.

- Local binary lookup walks up from cwd checking node_modules/.bin
- Version specs (e.g., `eslint@9`) skip local lookup and go remote
- Supports --package/-p, --shell-mode/-c, --silent/-s flags
- Shim created by `vp env setup` alongside node/npm/npx
- On Windows, uses `vp env exec vpx` pattern like other shims
Add two intermediate resolution steps to vpx to match npx behavior:
local node_modules/.bin -> global vp packages -> system PATH -> remote download

- Make dispatch helpers (find_package_for_binary, locate_package_binary,
  ensure_installed, locate_tool) pub(crate) for reuse by vpx
- Add find_global_binary() to check vp globally installed packages
- Add find_on_path() to check system PATH excluding vite-plus bin dir
- Add prepend_node_modules_bin_to_path() to prepend node_modules/.bin
  dirs to PATH before executing any found binary
- Update RFC with new lookup order and implementation architecture
- Add command-vpx-pnpm10 snap test
Update the RFC to accurately reflect the current implementation:
- Add global package and PATH lookup to summary and comparison table
- Fix monorepo edge case: walker goes to filesystem root, not workspace root
- Add JS binary handling for global packages
- Update error handling to mention all resolution steps
- Add security considerations for global packages and PATH exclusion
- Remove stale implementation plan and testing strategy sections
@fengmk2 fengmk2 merged commit 1642c76 into main Feb 10, 2026
17 checks passed
@fengmk2 fengmk2 deleted the vpx branch February 10, 2026 09:10
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.

2 participants