Skip to content

Conversation

@arihantbansal
Copy link

Problem

The gill docs use the Fumadocs framework, which provides a package-install plugin for showing install commands across different package managers. However, there was no equivalent plugin for package manager run commands (like npx codama run js or npm run build). This made it difficult to show users the correct commands for different package managers when executing CLI tools or running scripts.

Summary of Changes

  • Added new package @gillsdk/remark-package-commands with two Remark plugins:
    • remarkExecute - For registry execution commands (npx/dlx patterns)

      • Syntax: ```package-execute codama run js ```
      • Generates tabs: npx codama run js, pnpm dlx codama run js, yarn dlx codama run js, bunx codama run js
    • remarkPackageRun - For local script execution (npm run patterns)

      • Syntax: ```package-run build:docs ```
      • Generates tabs: npm run build:docs, pnpm run build:docs, yarn run build:docs, bun run build:docs

The implementation correctly distinguishes between registry execution (npx/pnpm dlx/yarn dlx/bunx) and local script execution (npm run/pnpm run/yarn run/bun run) as outlined in the issue requirements.

Fixes #169

@changeset-bot
Copy link

changeset-bot bot commented Oct 30, 2025

⚠️ No Changeset found

Latest commit: 9bcf9b1

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

Comment on lines +15 to +18
* - npm: npx codama run js
* - pnpm: pnpm dlx codama run js
* - yarn: yarn dlx codama run js
* - bun: bunx codama run js
Copy link
Contributor

Choose a reason for hiding this comment

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

For npx you probably want to add @latest here: npx codama@latest run js. Otherwise it'll use outdated dependencies if you run it, then a later version is released with updated dependencies. See npm/cli#4108

I know pnpx doesn't have this issue, but I'm unsure about the others. It's probably harmless to add @latest in any case though.

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.

[docs] package manager run commands plugin

2 participants