未固定版本的 `npx -y` 会自动下载并执行最新 CLI
原文依据:6 处多个步骤使用 `npx -y firebase-tools@latest`。`-y` 跳过安装确认,`@latest` 不固定经过审查的版本,因此未来发布的包内容会直接在本机执行,并继承终端和已登录 Firebase CLI 可访问的权限。
包被攻陷、错误发布或发生不兼容更新时,可能影响本地文件、CLI 凭据或 Firebase 项目;每次执行得到的代码也可能不同。
这些是可执行的安装/运行命令。`@latest` 每次可能解析到不同且未经用户审查的版本,`-y` 会跳过 npx 的安装确认;命令随后可使用当前终端和已登录 Firebase CLI 的权限创建项目、初始化或部署配置。这是常见的便捷用法,不表示包有恶意,但确实扩大了供应链和版本漂移风险。用户可限制为明确版本,并在运行前核验包来源和目标项目。
name: firebase-auth-basicsdescription: Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.compatibility: This skill is best used with the Firebase CLI, but does not require it. Firebase CLI can be accessed through `npx -y firebase-tools@latest`.metadata:查看另外 5 个位置
- **Firebase Project**: Created via `npx -y firebase-tools@latest projects:create` (see `firebase-basics`).- **Firebase CLI**: Installed and logged in (see `firebase-basics`).Before adding dependencies in your app, make sure you enable the Auth service inyour Firebase Project using the Firebase CLI:```bashnpx -y firebase-tools@latest init auth```description: Guide for setting up and using Firebase Authentication. Use this skill when the user's app requires user sign-in, user management, or secure data access using auth rules.compatibility: This skill is best used with the Firebase CLI, but does not require it. Firebase CLI can be accessed through `npx -y firebase-tools@latest`.metadata:```bashnpx -y firebase-tools@latest deploy --only auth``````bashnpx -y firebase-tools@latest init auth```