If you need the raw command strings for a specific package manager instead of executing them directly, use these command generators. They require the package manager identifier (<pm>).
// Get command to install dependencies
// Options: { short?: boolean, frozenLockFile?: boolean }
installDependenciesCommand('pnpm', { frozenLockFile: true });
// Get command to add a dependency
// Options: { dev?: boolean, global?: boolean, workspace?: boolean, yarnBerry?: boolean, short?: boolean }
addDependencyCommand('yarn', 'defu', { dev: true });
// Get command to run a script
// Options: { args?: string[] }
runScriptCommand('npm', 'build', { args: ['--production'] });
// Get command to download and execute a package (dlx)
// Options: { args?: string[], short?: boolean, packages?: string[] }
dlxCommand('bun', 'create-vite', { args: ['my-app'] });