macOS
brew install addlicenselocal Homebrew formula metadata
安装
brew install addlicenselocal Homebrew formula metadata
nix profile install nixpkgs#addlicensenixpkgs package indexes · pkgs/by-name/ad/addlicense/package.nix · 来源: api.github.com
概览
Scan directories recursively to ensure source files have license headers
历史
addlicense is a Google-maintained Go command that recursively scans source trees and adds or checks copyright license headers. It is deliberately simple: run it over patterns, choose a supported license template or file, and optionally fail CI with -check.
The official GitHub repository was created in June 2016. Its README describes a Go program that modifies source files in place, avoids duplicating headers that already exist, and supports Apache, BSD, MIT, and MPL-style headers plus custom license files.
The project is hosted under the google organization but explicitly says it is not an official Google product. The official tag list shows stable v1.x tags, and the README now documents Go installation, a GitHub Container Registry image, and pre-commit integration.
addlicense fits the common open-source maintenance workflow where license headers are enforced in presubmit, CI, or pre-commit rather than by hand. The supplied package-manager metadata shows Homebrew and Nix packaging, while the README documents go install, Docker, and an official pre-commit hook.
Typical use is addlicense . or addlicense with multiple file and directory patterns. Important package-maintainer flags include -check for verification-only runs, -ignore for vendored or generated files, -l for the license family, -f for custom text, -s for SPDX identifiers, and -c/-y for copyright holder and year.
For package and release engineers, addlicense is a boring tool in the best sense: it makes source-header policy reproducible and automatable. It is useful in repos where license conformance needs to be enforced before vendoring, releasing, or importing code into downstream packaging.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
addlicense | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/google/addlicense
安装元数据
| 软件包键 | brew:addlicense |
|---|---|
| 版本 | 1.2.0 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/addlicense |
| 主页 | https://github.com/google/addlicense |
| 仓库 | https://github.com/google/addlicense |
| 上游文档 | https://github.com/google/addlicense#readme |
| 许可证 | Apache-2.0 |
| 源码归档 | https://github.com/google/addlicense/archive/refs/tags/v1.2.0.tar.gz |
| 最后更新 | 2026-05-26T23:37:49-04:00 |
| Pulse | updated |
| 构建依赖 | go |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, arm64_ventura, sonoma, ventura, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | addlicense |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
addlicense
nix profile install nixpkgs#addlicense来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.