--- id: licenseheaders version: "0.8.8" license: MIT license_treatment: permissive maintenance: dormant --- # licenseheaders — Add or change license headers for all files in a directory License: permissive · Maintenance: dormant · Downloads: 82.8K/mo ## What it is and what it does licenseheaders is a command-line tool that automates the addition, update, or replacement of license headers across a codebase. It scans a directory tree for source files in known languages (Python, JavaScript, C++, Java, Go, Rust, SQL, YAML, and many others) and applies a license header template to each one, substituting variables like project name, owner, and year range. The tool supports dry-run mode to preview changes, file exclusion patterns, custom file extensions, and encoding options. It's designed for developers who need to maintain consistent copyright and license declarations across large or multi-language projects. You provide a template (either a built-in one or a custom file), specify metadata like copyright owner and project URL, and the tool handles the rest. It can back up modified files and respects your choice of which file types to process. Use it for: - Add MIT or GPL headers to all source files in a new open-source project in one command. - Update copyright years across an entire codebase without manual editing. - Enforce consistent license headers in a multi-language monorepo (Python, JavaScript, Go, etc.). - Integrate with pre-commit hooks to ensure new files get license headers before commit. - Replace an old license header with a new one across thousands of files. - Add license headers to generated or templated files with custom extensions. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Batch-updates or adds license headers to source files across a directory tree, supporting dozens of file types from Python and JavaScript to C++, Java, and SQL. Yes, if you maintain a multi-language codebase and need to add or update license headers at scale. The tool is stable, has no vulnerabilities, and low install friction. However, maintenance is dormant (no updates since 2021); if you need active support or expect breaking changes in newer Python versions, consider whether the risk of stale code matters for your use case. ## Install pip install licenseheaders uv add licenseheaders poetry add licenseheaders ## Installing licenseheaders Before you install: Low friction install with a single runtime dependency (regex). Maintenance is dormant—last release was 2021-04-08 and no commits since 2023-10-24—but the package is marked Production/Stable and has no known vulnerabilities. License in practice: MIT license (permissive) means you can use, modify, and distribute this tool freely with minimal restrictions; include the license text in your distribution. Quickstart: pip install licenseheaders licenseheaders -t lgpl-v3 -y 2012-2014 -o "Your Company" -n "ProjectName" -d ./src Requires Python 3.5 or higher. Verify before relying: - Whether predefined templates (lgpl-v3, etc.) are included or must be provided separately. - Whether the tool can be used programmatically as a library or only via CLI. - Support status for Python versions beyond 3.5. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: dormant - Downloads: 82.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags add license headers to source files, batch update copyright headers, license header management tool, bulk add license text to code, copyright header automation, license header generator, multi-language license headers, license-automation, multi-language, cli-tool [View on SkillFed](https://skillfed.io/packages/licenseheaders) · [View on PyPI](https://pypi.org/project/licenseheaders/)