Skip to content

docs: clarify package manager completions delegate to local CLIs#134

Merged
AmirSa12 merged 2 commits into
bombshell-dev:mainfrom
theoephraim:docs-clarify-local-cli-completions
Jun 19, 2026
Merged

docs: clarify package manager completions delegate to local CLIs#134
AmirSa12 merged 2 commits into
bombshell-dev:mainfrom
theoephraim:docs-clarify-local-cli-completions

Conversation

@theoephraim

@theoephraim theoephraim commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

What

The README's Package Manager Completions section only shows completing the package manager's own flags (e.g. pnpm install --reporter=<TAB>). It doesn't mention what's arguably the most useful behavior: package-manager completion also delegates to CLIs installed as local project dependencies.

When a user has tab pnpm zsh (etc.) installed, typing pnpm exec my-cli <TAB> completes my-cli's own subcommands and flags — even though my-cli isn't on PATH and the user never installed its completion script. This isn't documented anywhere, so CLI authors and users don't know it works.

Why

This came up while documenting completions for varlock. Our docs initially (incorrectly) told users that completion "won't work when installed as a local dependency." You told me on discord and I confirmed in the code that is not true — the package-manager completion strips exec/x/run/dlx, detects whether the target CLI speaks the completion protocol, and forwards the request (falling back to <pm> <cli> complete -- … so local binaries resolve).

Changes

Adds a Completing locally-installed CLIs subsection that:

  • shows the pnpm exec / dlx / bare forms
  • briefly explains the delegation mechanism
  • notes the genuine exception: npx / bunx are separate binaries with no completion of their own, so those forms don't work — use npm exec / bun x instead

Docs-only change.

@changeset-bot

changeset-bot Bot commented Jun 18, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2c98859

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Jun 18, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tab@134

commit: 2c98859

@AmirSa12 AmirSa12 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hey @theoephraim !
I remember bringing this up on discord.
Thanks for the PR ❤️ I will fully refresh the docs soon.

@AmirSa12 AmirSa12 merged commit 7f66474 into bombshell-dev:main Jun 19, 2026
11 checks passed
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