2

I'm making a single-executable CLI program that I plan on distributing with some man pages.

But I can't seem to understand whether or not I can comply with the MIT license by adding an argument (-a or --show-attributions) that will print the licenses for each library I use.
Would that comply with the license, or do I have to write it into some LICENSES file?

8
  • 1
    Are all the libraries MIT licensed? If you want to put attributions in a command in your app, I would probably put them in a "--help" or "--about" or "--version" command for a CLI tool. See also: What are the requirements for attribution in the MIT License?
    – Brandin
    Commented May 27, 2018 at 7:23
  • @Brandin So I can print something similar to: "Library X owned by User X, Library Y owned by User Y. (insert MIT license)"?
    – mid
    Commented May 27, 2018 at 8:29
  • You can, if you want to. You don't have to.
    – MadHatter
    Commented May 27, 2018 at 9:16
  • @MadHatter I don't have to what?
    – mid
    Commented May 27, 2018 at 9:26
  • Yes, you can print something similar to (what you wrote). No, you do not have to.
    – MadHatter
    Commented May 27, 2018 at 10:03

1 Answer 1

2

There is no single MIT licence, and the FSF advises against using the term as it is ambiguous. Assuming you're referring to the X11 licence, which seems to be the most common one so named, the licence obligation is that

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

According to choose-a-license, to apply this licence you should

Create a text file (typically named LICENSE or LICENSE.txt) in the root of your source code and copy the text of the license into the file. Replace [year] with the current year and [fullname] with the name (or names) of the copyright holders.

There is no obligation on you to make your software disgorge the licence terms, or the licence itself, in response to any particular command-line input; you just have to include the copyright and permissions statements somewhere in what you distribute.

But if, in order to keep what you distribute down to a single binary, you were to choose to make your software behave so, then as Brandin notes above, the most common flags would be --help, --about, and --version. owned by is fairly confusing language, so stick with Library X (c) Fred Yoyodyne, 2018). If you were to make your software, in response to the chosen flag, disgorge the relevant copyright statements along with the full text of the licence, that would fulfil your obligations, it seems to me (caveat: IANAL/IANYL), as "embedded in the binary" is one way to satisfy "included".

If you're distributing more than just a binary (eg, because you're using a package manager to distribute it), then include the relevant file, and don't worry about getting the binary to disgorge anything licence-related.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.