Skip to content
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

Feature request: add agent sub-command #650

Open
zanminkian opened this issue Feb 12, 2025 · 0 comments
Open

Feature request: add agent sub-command #650

zanminkian opened this issue Feb 12, 2025 · 0 comments

Comments

@zanminkian
Copy link

zanminkian commented Feb 12, 2025

Backgroud

@antfu/ni has an na command, which is agent alias. Running na install or na run build will detect and use the right package manager to execute the corresponding command.

  • na install ➡️ npm install / pnpm install / yarn install
  • na run build ➡️ npm run build / pnpm run build / yarn run build
  • na foo bar ➡️ npm foo bar / pnpm foo bar / yarn foo bar

Solution

It's good provide a sub-command named agent in corepack. So that we don't need @antfu/ni

  • corepack agent install ➡️ npm install / pnpm install / yarn install
  • corepack agent run build ➡️ npm run build / pnpm run build / yarn run build
  • corepack agent foo bar ➡️ npm foo bar / pnpm foo bar / yarn foo bar
  • ...

If there is no packageManager field in package.json, use npm by default.

Addintion

Providing a cpa command which is the alias of corepack agent will be great.

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

No branches or pull requests

1 participant