LICENSECHECK(1)
๐ LICENSECHECK ๐
okay bestie, this is licensecheck from the User Contributed Perl Documentation corner of the universe, and it's literally the girl who reads the first few lines of every file and goes "oh I know exactly what license this is." she's serving Version v3.3.9 and she's been doing this since before some of y'all were born.
โจ NAME โจ
licensecheck โ simple license checker for source files ๐ต๏ธโโ๏ธ
๐ธ VERSION ๐ธ
Version v3.3.9 โ yes queen, we're on the current release.
๐ฆ SYNOPSIS ๐ฆ
licensecheck [ --help | --version ]
licensecheck [ --list-licenses | --list-naming-schemes ]
licensecheck [OPTION...] PATH [PATH...]
three moods, three ways to call her. pick your vibe. ๐
๐ DESCRIPTION ๐
so basically, licensecheck tries to figure out which license applies to each file you hand her, by searching the start of the file for text belonging to various licenses. she's not psychic, she's just really good at pattern matching at the top of files. no cap.
if any of the arguments you pass are directories, licensecheck will add the files contained within to the list of files to process. she'll just, like, scoop them up. ๐ฅ
when multiple PATHs are provided, only files matching --check and not --ignore are checked. that's the rule, fr fr.
๐ OPTIONS ๐
๐ซ Resolving patterns
--shortname-schemeโ Since v3.2. comma-separated priority list of license naming schemes to use for license identifiers (default value: unset (use verbose description)). so instead of the whole essay of a license name, you get the cute little nickname. iconic.--list-licensesโ Since v3.2. list identifiers for all detectable licenses and exit. she shows you the whole roster, then dips. ๐จ--list-naming-schemesโ Since v3.2. list all available license naming schemes and exit. every nickname system she knows about, laid out.
๐ Selecting files
-c REGEX,--check=REGEXโ Since v2.10.10. regular expression of files to include when more than one PATH is provided (default value: common source files). the "you're invited to the party" list. โจ-i REGEX,--ignore=REGEXโ Since v2.10.10. regular expression of files to skip when more than one PATH is provided (default value: some backup and VCS files). the "not you bestie" list. ๐-r,--recursiveโ Since v2.10.7. traverse directories recursively. she goes down every folder. she's thorough like that.
๐ Parsing contents
-l N,--lines=Nโ Since v2.10.3. number of lines to parse from top of each file; implies optimistic search including only first cluster of detected copyrights or licenses; set to0to parse the whole file (and ignore--tail) (default value:60). she's like, only reading the first few paragraphs of the essay and being confident about it. and honestly? she's usually right.--tail=Nโ Since v2.15.10. number of bytes to parse from bottom of each file when parsing only from top of each file and finding nothing there; set to0to avoid parsing from end of file (or set--linesto0and ignore this setting) (default value:5000(roughly 60 lines)). the backup plan โ if the top said nothing, she peeks at the bottom. ๐-e CODEC,--encoding=CODECโ Since v2.15.10. try decode source files from the specified codec, with"iso-8859-1"as fallback (default value: unset (no decoding)). for when the file's text is giving "what language is this" and she needs to translate first.
๐ Reporting results
--copyrightโ Since v2.10.7. add copyright statements to license information. receipts included. ๐งพ-s,--skippedโ Since v3.3.0. Log files in PATHs matching neither--checknor--ignoreas warnings (default: log as debug). she'll announce the files she skipped instead of quietly moving on.-m,--machineโ Since v2.12.2. print license information as"TAB"-separated fields, for processing with line-oriented tools like"awk"and"sort". robot-friendly format. beep boop. ๐ค--[no-]deb-machineโ Since v3.0.0. print license information like a Debian copyright file; implies--copyrightand--shortname-scheme=debian,spdx. Debian girlies rise up. ๐ง--list-delimiter=PRINTFโ Since v3.0.18. printf-string used between multiple plain list items in Debian copyright file (default value:'\n '(NEWLINE SPACE)).--rfc822-delimiter=PRINTFโ Since v3.0.18. printf-string used between multiple RFC822-style items in Debian copyright file (default value:'\n '(NEWLINE SPACE SPACE)).--copyright-delimiter=PRINTFโ Since v3.0.19. printf-string used between years and owners in Debian copyright file (default value:', '(COMMA SPACE)).--[no-]merge-licensesโ Since v3.0.0. merge same-licensed files in Debian copyright file. grouping the girlies who match. ๐ซถ
๐ General
-h,--helpโ print help message and exit. she tells you everything then leaves immediately, no small talk.-v,--versionโ print version and copyright information and exit. the "who are you and where do you come from" option.--quiet,--verbose,--debug,--traceโ Since v3.3.0. Emit only error messages to STDERR (with option--quiet), or (in addition errors and warnings) also notices/debug/traces. The more "noisy" option wins if several are set. (default: emit errors and warnings). the volume knob of this entire program โ turn it up and she will NOT stop telling you about her day. ๐ฃ๏ธ
๐ ENVIRONMENT ๐
NO_COLORโ If defined, will disable color. Consulted beforeCOLOR. the "no glitter today" switch.COLORโ Can be set to0to explicitly disable colors. The default is to use color when connected to a terminal. so if you're in a terminal, she's gonna be pretty about it. ๐LOG_LEVEL=itemQUIET=itemVERBOSE=itemDEBUG=itemTRACEโ Used to emit varying details about discoveries to STDERR when verbosity is not set using either of options--quiet,--verbose,--debugor--trace. SeeLog::Any::Adapter::Screenfor more details.LOG_PREFIXโ The default formatter groks these variables. See formatter inLog::Any::Adapter::Screenfor more details.
๐ CAVEATS ๐
The exact output may change between releases, due to the inherently fragile scanning of unstructured data, and the ongoing improvements to detection patterns. For some level of stability, use one of the machine-readable output formats and define a --shortname-scheme.
bestie listen. she is reading unstructured data with regexes. it's giving chaos and she knows it. if you need your output to stay the same forever, use a machine-readable format and lock in a --shortname-scheme. otherwise, next release might shift things and that's just the nature of the game. ๐ญ
Option --deb-fmt was deprecated since v3.2. Please use option --shortname-scheme=debian,spdx instead.
โ ๏ธ--deb-fmtis deprecated sincev3.2โ she's moved on, and so should you. use--shortname-scheme=debian,spdx.
๐ฆ SEE ALSO ๐ฆ
Other similar tools exist.
Here is a list of known tools also command-line based and general-purpose:
copyright-update<https://github.com/jaalto/project--copyright-update>โ Written in Perl.debmake<http://anonscm.debian.org/git/collab-maint/debmake.git>โ Written in Python. Specific to Debian packages.decopy<https://anonscm.debian.org/git/collab-maint/decopy.git>โ Written in Python.Licensee<http://ben.balter.com/licensee/>โ Written in Ruby.LicenseFinder<https://github.com/pivotal/LicenseFinder>โ Written in Ruby.ninka<http://ninka.turingmachine.org/>โ Written in C++. Used inFOSSology<http://fossology.org/>(along with Monk and Nomos apparently unavailable as standalone command-line tools).ripper<https://github.com/odeke-em/ripper>โ Written in Go.scancode-toolkit<https://github.com/nexB/scancode-toolkit>โ Written in Python.
๐ AUTHOR ๐
Jonas Smedegaard "<dr@jones.dk>"
๐ COPYRIGHT AND LICENSE ๐
This program is based on the script "licensecheck" from the KDE SDK, originally introduced by Stefan Westerfeld "<stefan@space.twc.de>".
Copyright ยฉ 2007, 2008 Adam D. Barratt
Copyright ยฉ 2012 Francesco Poli
Copyright ยฉ 2016-2022 Jonas Smedegaard
Copyright ยฉ 2017-2022 Purism SPC
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
so yeah, she's aperl v5.42.0girlie, page stamped2025-07-24, and this whole manual page was brought to you by the letters L-I-C-E-N-S-E-C-H-E-C-K and the number 1. mwah. ๐โจ bye bestie, go check some licenses. ๐ฆ
๐ฆ where this page comes from
- fedora 43: licensecheck 3.3.9-7.fc43 ยท AGPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms