addlicense
brew install addlicense
v1.2.0
Apache-2.0
Scan directories recursively to ensure source files have license headers
329
30-day installs · #2120
698
90-day · #2547
3.2k
365-day · #2355
880
★ GitHub stars · updated 9mo ago
Build dependencies
GitHub topics
license
utility
Links
- https://github.com/google/addlicense
- GitHub: google/addlicense
- Brew formula source: Formula/a/addlicense.rb
Raw metadata
{
"aliases": [],
"alternatives": [],
"build_dependencies": [
"go"
],
"categories": [],
"caveats": null,
"conflicts_with": [],
"dependencies": [],
"deprecated": 0,
"deprecation_reason": null,
"desc": "Scan directories recursively to ensure source files have license headers",
"disable_reason": null,
"disabled": 0,
"enrichment_fetched_at": "2026-06-20T23:35:18+00:00",
"first_seen": "2026-06-20T23:34:18+00:00",
"full_name": "addlicense",
"github_default_branch": "master",
"github_last_commit_at": "2025-10-28T18:50:02Z",
"github_readme_excerpt": "# addlicense\n\nThe program ensures source code files have copyright license headers\nby scanning directory patterns recursively.\n\nIt modifies all source files in place and avoids adding a license header\nto any file that already has one.\n\naddlicense requires go 1.16 or later.\n\n## install\n\n go install github.com/google/addlicense@latest\n\n## usage\n\n addlicense [flags] pattern [pattern ...]\n\n -c copyright holder (default \"Google LLC\")\n -check check only mode: verify presence of license headers and exit with non-zero code if missing\n -f license file\n -ignore file patterns to ignore, for example: -ignore **/*.go -ignore vendor/**\n -l license type: apache, bsd, mit, mpl (default \"apache\")\n -s Include SPDX identifier in license header. Set -s=only to only include SPDX identifier.\n -v verbose mode: print the name of the files that are modified\n -y copyright year(s) (default is the current year)\n\nThe pattern argument can be provided multiple times, and may also refer\nto single files. Directories are processed recursively.\n\nFor example, to run addlicense across everything in the current directory and\nall subdirectories:\n\n addlicense .\n\nThe `-ignore` flag can use any pattern [supported by\ndoublestar](https://github.com/bmatcuk/doublestar#patterns).\n\n## Running in a Docker Container\n\nThe simplest way to get the addlicense docker image is to pull from GitHub\nContainer Registry:\n\n```bash\ndocker pull ghcr.io/google/addlicense:latest\n```\n\nAlternately, you can build it from source yourself:\n\n```bash\ndocker build -t ghcr.io/google/addlicense .\n```\n\nOnce you have the image, you can test that it works by running:\n\n```bash\ndocker run -it ghcr.io/google/addlicense -h\n```\n\nFinally, to run it, mount the directory you want to scan to `/src` and pass the\nappropriate addlicense flags:\n\n```bash\ndocker run -it -v ${PWD}:/src ghcr.io/google/addlicense -c \"Google LLC\" *.go\n```\n\n## Running with pre-commit\n\nThis is the official [pre-comm",
"github_repo": "google/addlicense",
"github_stars": 880,
"github_topics": [
"license",
"utility"
],
"homepage": "https://github.com/google/addlicense",
"homepage_og_description": null,
"homepage_og_image": null,
"homepage_title": null,
"installs_30d": 329,
"installs_365d": 3180,
"installs_90d": 698,
"keg_only": 0,
"keg_only_reason": null,
"last_seen": "2026-06-20T23:34:18+00:00",
"license": "Apache-2.0",
"llm_generated_at": null,
"llm_model": null,
"name": "addlicense",
"oldnames": [],
"one_liner": null,
"optional_dependencies": [],
"rank_30d": 2120,
"rank_365d": 2355,
"rank_90d": 2547,
"raw_hash": "19ba23ad6b561368",
"recommended_dependencies": [],
"revision": 0,
"ruby_source_path": "Formula/a/addlicense.rb",
"tap": "homebrew/core",
"test_dependencies": [],
"uses_from_macos": [],
"version_head": "HEAD",
"version_stable": "1.2.0",
"versioned_formulae": [],
"why_use_this": null
}