list
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseList and Search Dependencies
列出并搜索依赖项
Query the current state of dependencies in a project.
查询项目中依赖项的当前状态。
Commands
命令
List all dependencies at HEAD:
bash
git-pkgs listOptions:
- - list at a specific commit
--commit=REF - - filter by ecosystem
--ecosystem=ECO - - filter by manifest file
--manifest=PATH - - JSON output
--json
Show dependency tree (grouped by manifest and type):
bash
git-pkgs treeSearch by name pattern:
bash
git-pkgs search lodash
git-pkgs search "react-*"Find where a package is declared (file path, line number, content):
bash
git-pkgs where lodashOpen a package's source in your editor:
bash
git-pkgs browse lodashShow registry URLs (registry page, download, docs, PURL):
bash
git-pkgs urls lodash
git-pkgs urls pkg:npm/lodash@4.17.21Show lockfile integrity hashes and detect drift:
bash
git-pkgs integrityManage notes on packages:
bash
git-pkgs notes add pkg:npm/lodash "reviewed for security"
git-pkgs notes list pkg:npm/lodash列出HEAD版本的所有依赖项:
bash
git-pkgs list选项:
- - 在指定提交版本中列出依赖项
--commit=REF - - 按生态系统过滤
--ecosystem=ECO - - 按清单文件过滤
--manifest=PATH - - 以JSON格式输出
--json
显示依赖树(按清单文件和类型分组):
bash
git-pkgs tree按名称模式搜索:
bash
git-pkgs search lodash
git-pkgs search "react-*"查找包的声明位置(文件路径、行号、内容):
bash
git-pkgs where lodash在编辑器中打开包的源代码:
bash
git-pkgs browse lodash显示注册表URL(注册表页面、下载链接、文档、PURL):
bash
git-pkgs urls lodash
git-pkgs urls pkg:npm/lodash@4.17.21显示锁文件完整性哈希值并检测偏移:
bash
git-pkgs integrity管理包的备注:
bash
git-pkgs notes add pkg:npm/lodash "reviewed for security"
git-pkgs notes list pkg:npm/lodashWhen to use
使用场景
- When the user asks what dependencies are installed
- When looking for a specific package in the project
- When checking which manifest file declares a dependency
- When exploring the dependency structure
- 当用户询问已安装哪些依赖项时
- 当在项目中查找特定包时
- 当检查依赖项在哪个清单文件中声明时
- 当探索依赖项结构时