Would you like to have nice, up-to-date license/copyright headers in your source code files but hate to manage them by hand? Then Headroom is the right tool for you! Now you can define your license header as Mustache template, put all the variables (such as author's name, year, etc.) into the YAML config file and Headroom will take care to add such license headers to all your source code files.


Keywords
library, program, utils, Propose Tags , Headroom.Command, Headroom.Command.Bootstrap, Headroom.Command.Gen, Headroom.Command.Init, Headroom.Command.Readers, Headroom.Command.Run, Headroom.Command.Types, Headroom.Command.Utils, Headroom.Config, Headroom.Config.Compat, Headroom.Config.Enrich, Headroom.Config.Global, Headroom.Config.Types, Headroom.Data.Coerce, Headroom.Data.EnumExtra, Headroom.Data.Has, Headroom.Data.Lens, Headroom.Data.Regex, Headroom.Data.Serialization, Headroom.Data.Text, Headroom.Embedded, Headroom.Embedded.TH, Headroom.FileSupport, Headroom.FileSupport.C, Headroom.FileSupport.CPP, Headroom.FileSupport.CSS, Headroom.FileSupport.Dart, Headroom.FileSupport.Go, Headroom.FileSupport.HTML, Headroom.FileSupport.Haskell, Headroom.FileSupport.Haskell.Haddock, Headroom.FileSupport.JS, Headroom.FileSupport.Java, Headroom.FileSupport.Kotlin, Headroom.FileSupport.PHP, Headroom.FileSupport.PureScript, Headroom.FileSupport.Rust, Headroom.FileSupport.Scala, Headroom.FileSupport.Shell, Headroom.FileSupport.TemplateData, Headroom.FileSupport.Types, Headroom.FileType, Headroom.FileType.Types, Headroom.Header, Headroom.Header.Sanitize, Headroom.Header.Types, Headroom.IO.FileSystem, Headroom.IO.KVStore, Headroom.IO.Network, Headroom.Meta, Headroom.Meta.Version, Headroom.PostProcess, Headroom.PostProcess.Types, Headroom.PostProcess.UpdateCopyright, Headroom.SourceCode, Headroom.Template, Headroom.Template.Mustache, Headroom.Template.TemplateRef, Headroom.Types, Headroom.UI, Headroom.UI.Message, Headroom.UI.Progress, Headroom.UI.Table, Headroom.Updater, Headroom.Variables, Headroom.Variables.Types, Mustache, YAML, adding, replacing or dropping, update years in copyrights, content-aware templates, Add, replace or drop license headers, configuration, generate them for you, initialize itself, exposes additional info, update years in your copyrights, releases page, Homebrew, project microsite, submit new issue, pull request, kowainik/hit-on, kowainik/summoner, wireapp/wire-server, Bind The Gap magazine, issue #2, official project microsite, Headroom on Hackage, MkDocs, haskell, license-management
License
BSD-3-Clause
Install
cabal install headroom-0.4.3.0

Documentation

CI Hackage version Stackage version

Would you like to have nice, up-to-date license/copyright headers in your source code files but hate to manage them manually? Then Headroom is the right tool for you. Define your license header as Mustache template, put any template variables into YAML configuarion file, and you're ready to go!

Headroom also offers much more than just adding, replacing or dropping license headers. It can also update years in copyrights for you, provides content-aware templates for some source code file types, and much more!

asciicast

Main Features

  • License Header Management - Add, replace or drop license headers in your source code files with a single command. What's more, contrary to many similar tools, Headroom allows you to also replace/drop headers that weren't previously generated by Headroom, using smart header auto-detection.
  • Powerful Customization - Default configuration should cover most use-cases, but if you need to put empty lines before/after generated header, use different comment style of headers, you can customize the configuration to match exactly your needs.
  • Built-in OSS License Headers - If you want to use license header for one of the popular OSS licenses, then Headroom can generate them for you - no need to search for them on web.
  • Automatic Initialization for OSS Projects - Setting up external tools like Headroom for your project can be boring. Fortunately, Headroom can initialize itself for your project, by generating configuration file and template files.
  • Content-aware Templates - for selected file types, Headroom exposes additional info about processed file using template variables, so you can use info like Java package name in your templates.
  • Copyright Year Updater - Headroom is good not only for basic license header management, but also for further processing of generated headers. Do you need to update years in your copyrights? No problem!

Installation

You can get Headroom via one of the following options:

  1. download pre-built binary for GNU/Linux or macOS (x64) from releases page
  2. install using Homebrew: brew install norcane/tools/headroom
  3. build from source code - see project microsite for more details

Adopters

Here is the list of projects using Headroom. If you're using Headroom and aren't on the list, feel free to submit new issue or pull request.

Mentions

Documentation

Running microsite locally

If you need to show microsite documetation for unreleased version of Headroom (e.g. for master branch), you can run it locally using MkDocs tool:

$ cd doc/microsite/
$ mkdcs serve

Documentation is then available on http://127.0.0.1:8000.