Skip to content
/ deps Public

Deps 是一个帮助获取项目依赖包的版本、开源协议、安全漏洞等清单的工具,数据源来自 Google 的 https://deps.dev 项目,当前支持 Go、Java。

License

Notifications You must be signed in to change notification settings

hb-chen/deps

Repository files navigation

Deps

Deps 是一个帮助获取项目依赖包的版本、开源协议、安全漏洞等清单的工具,数据源来自 Google 的 deps.dev 项目,当前支持 Go、Java。

Feature

image

Install

Binary

Releases

Source

go install github.com/hb-chen/deps@latest

Usage

Usage:
  deps [flags]

Flags:
  -h, --help             help for deps
  -o, --out string       template output filepath (default "./deps.md")
  -p, --project string   project path (default "", use "pwd")
      --skip strings     skip scrape package regexp pattern
  -s, --system string    system type:auto, mod, maven (default "auto")
  -t, --tpl string       template output template filepath. md.tpl,csv.tpl or custom template filepath (default "md.tpl")
  -v, --version          version for deps
  • --skip 忽略非开源依赖包
    • deps -s maven -p ./ --skip="com.hbchen.*"

Golang

# Run
cd {golang project path}
deps -s mod
# Or run with -p
deps -s mod -p {project path}

# Output
# Markdown
./deps.md

# Stdout
Dependencies:
Pkg: golang.org/x/tools, Licenses: BSD-3-Clause , Direct: false ,Advisories: 0 
Pkg: github.com/kr/text, Licenses: MIT , Direct: false ,Advisories: 0 
Pkg: golang.org/x/mod, Licenses: BSD-3-Clause , Direct: false ,Advisories: 0 
...

Maven

引入依赖 github.com/ferstl/depgraph-maven-plugin,能够通过 mvnw depgraph:graph OR mvn depgraph:graph 生成 target/dependency-graph.json

# Run
cd {golang project path}
deps -s maven
# Or run with -p
# deps -s go -p {project path}
deps -s maven -p ./example/java/

# Output
# Markdown
./deps.md

# Stdout
Dependencies:
Pkg: org.mockito:mockito-junit-jupiter, Licenses: MIT , Direct: false ,Advisories: 0 
Pkg: org.ow2.asm:asm, Licenses: BSD-3-Clause , Direct: false ,Advisories: 0 
Pkg: jakarta.xml.bind:jakarta.xml.bind-api, Licenses: non-standard , Direct: false ,Advisories: 0 
Pkg: org.apache.logging.log4j:log4j-api, Licenses: Apache-2.0 , Direct: false ,Advisories: 0 
...

deps.dev API

About

Deps 是一个帮助获取项目依赖包的版本、开源协议、安全漏洞等清单的工具,数据源来自 Google 的 https://deps.dev 项目,当前支持 Go、Java。

Resources

License

Stars

Watchers

Forks

Packages

No packages published