Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds package manager selection (npm or yarn) to the CLI scaffolding tool, enabling users to choose their preferred dependency installer for both runtime installation and post-generation command guidance.
Changes:
- Added
PackageManagertype and integrated it throughout CLI state (flags, selections, defaults) - Implemented CLI argument parsing for
--package-manager,--pm, and--yarnshortcut flags - Updated interactive prompts, execution logic, and output formatting to respect the selected package manager
- Added comprehensive test coverage and documentation
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
src/core/types.ts |
Added PackageManager type and integrated it into CliFlags, FlagPresence, and UserSelections interfaces |
src/core/defaults.ts |
Added packageManager: 'npm' default selection |
src/core/labels.ts |
Added packageManagerLabel() helper for UI display |
src/cli/args.ts |
Implemented parsing for --package-manager=<value>, --pm <value>, and --yarn flags with proper validation |
src/cli/prompts.ts |
Added package manager selection prompt in interactive flow |
src/cli/output.ts |
Refactored command output helpers to generate package-manager-specific commands (npm vs yarn) |
src/utils/exec.ts |
Added package manager parameter to install functions and command formatting |
src/cli/index.ts |
Added package manager availability check and updated install flow to use selected package manager |
test/args.test.ts |
Added comprehensive tests for package manager parsing, shortcuts, and edge cases |
test/output.test.ts |
Added test for yarn command rendering in output |
README.md |
Updated documentation with package manager option, flags, and usage example |
CHANGELOG.md |
Added release notes for version 0.1.7 |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Package Manager (Yarn) Support — February 21, 2026
Context
This update adds package manager selection to the CLI so dependency installation and post-generation command guidance can use either
npm(default) oryarn.Before this change, installs and next-step commands were hardcoded to npm.
What Was Added
1. Package manager modeled in CLI state
PackageManager = 'npm' | 'yarn'type.packageManagerto:npm.Primary files:
src/core/types.tssrc/core/defaults.tssrc/core/labels.ts2. CLI argument support for package manager selection
--package-manager=<npm|yarn>--pm <npm|yarn>--yarn(shortcut)--yarn=falsebehavior to map back to npm.--pmvalues do not consume project-name positional arguments.Primary file:
src/cli/args.ts3. Interactive prompt selection
Package managerprompt in interactive flow when not provided via flags.--yes/ non-TTY) flow uses parsed/default package manager.Primary file:
src/cli/prompts.ts4. Install execution now uses selected package manager
npm install --no-audit --no-fund [--loglevel=error]yarn install [--silent]--no-installare not blocked by missing yarn).Primary files:
src/utils/exec.tssrc/cli/index.ts5. Next-steps output now reflects selected package manager
npm run .../npm testfor npmyarn ...for yarnPrimary file:
src/cli/output.ts6. Documentation updates
--package-manager=<name>--pm <name>--yarn0.1.7.Primary files:
README.mdCHANGELOG.mdTest Coverage and Verification
Updated tests:
test/args.test.ts--package-managerand--pm--yarn--pmtest/output.test.tsVerification executed:
npm run test:unitnpm run lintnpm run buildResult
The CLI now supports Yarn end-to-end for dependency installation and command guidance, while keeping npm as default behavior.