attribution-gen
is a tools that helps you generate license attributions
files. Currently it only works with Go projects using modules.
We hope you find this tool useful; please verify the accuracy of the detected third party code and licenses.
- Install to $GOBIN
go install github.com/awslabs/attribution-gen/...@latest
The easiest way to use attribution-gen
is to run it inside the directory
of your Go project.
attribution-gen --debug # default generated file name is ATTRIBUTIONS.md
By default the max depth allowed while exploring the dependency graph is 2,
you can override this value by using the --depth
flag.
attribution-gen --depth 5 --debug
You can also set the output/input and the templates used to generate the attributions file.
attribution-gen --output ATTRIBUTIONS.md --modfile go.mod\
--attr-header-template $(HEADER_TMP)\
--attr-block-template $(BLOCK_TMP)
You can also print the dependency graph using the --show-graph
flag
attribution-gen --show-graph --depth 2
# OUTPUT
INFO[0004] attribution-gen
├── github.com/google/[email protected] Apache-2.0
│ ├── github.com/google/[email protected] BSD-3-Clause
│ └── github.com/google/[email protected] Apache-2.0
├── github.com/google/licenseclassifier/[email protected] Apache-2.0
│ ├── github.com/davecgh/[email protected] ISC
│ ├── github.com/google/[email protected] BSD-3-Clause
│ └── github.com/sergi/[email protected] Copyright
├── github.com/sirupsen/[email protected] MIT
│ ├── github.com/davecgh/[email protected] ISC
│ ├── github.com/pmezard/[email protected] BSD-3-Clause
│ ├── github.com/stretchr/[email protected] MIT
│ └── golang.org/x/[email protected] BSD-3-Clause
├── github.com/spf13/[email protected] Apache-2.0
│ ├── github.com/cpuguy83/go-md2man/[email protected] MIT
│ ├── github.com/inconshreveable/[email protected] Apache-2.0
│ ├── github.com/spf13/[email protected] BSD-3-Clause
│ └── gopkg.in/[email protected] Apache-2.0
├── github.com/xlab/[email protected] MIT
│ └── github.com/stretchr/[email protected] MIT
├── golang.org/x/[email protected] BSD-3-Clause
│ ├── github.com/google/[email protected] BSD-3-Clause
│ ├── golang.org/x/[email protected] BSD-3-Clause
│ ├── golang.org/x/[email protected] BSD-3-Clause
│ └── golang.org/x/[email protected] BSD-3-Clause
└── golang.org/x/[email protected] BSD-3-Clause
make cli-test
See CONTRIBUTING for more information.
This project is licensed under the Apache-2.0 License.