I’m developing a tool that generates code from some various data. The tool itself will be licensed with the MIT license, which strikes a good balance for me in terms of allowing the freedom to use and modify it, while still holding the copyright.
OK, but what is the legal status of the code generated by the tool? Who holds the copyright for code generated by a tool? Do I need to give users of the tool a license for the generated code, or do they already have that by virtue of it being generated by them?
What is different about this code generation system (which may be relevant) is that the source information about the code generation is provided by the system itself. The user doesn’t feed source data in; the source data is bundled along with it. They simply have the means to transform it in various ways (filtering out parts of the data they don’t want, etc). Obviously they could edit the bundled data. Does that affect anything about this?
1
The Free Software Foundation addresses this in their FAQ
Is there some way that I can GPL the output people get from use of my program? For example, if my program is used to develop hardware designs, can I require that these designs must be free?
In general this is legally impossible; copyright law does not give you any say in the use of the output people make from their data using your program. If the user uses your program to enter or convert his own data, the copyright on the output belongs to him, not you. More generally, when a program translates its input into some other form, the copyright status of the output inherits that of the input it was generated from.
So the only way you have a say in the use of the output is if substantial parts of the output are copied (more or less) from text in your program. For instance, part of the output of Bison (see above) would be covered by the GNU GPL, if we had not made an exception in this specific case.
You could artificially make a program copy certain text into its output even if there is no technical reason to do so. But if that copied text serves no practical purpose, the user could simply delete that text from the output and use only the rest. Then he would not have to obey the conditions on redistribution of the copied text.
I believe this applies to any Copyrighted work not just GPLed code. The output is not typically a derived work unless it includes substantial parts of the copyrighted work.
That said if the source data is under the MIT license and is included verbatim in the output then the output may be covered by the MIT license as a derivative work, but if the source data is transformed in substantial ways then the output would probably not be covered as a derivative work.
4
I don’t know too much about your tool, but it sounds similar to what the “bake” utility in CakePHP framework does. The CakePHP bake command similarly builds an entire working application using some non-code input from the user.
This is the CakePHP license:
CakePHP is licensed under the MIT license. This means that you are
free to modify, distribute and republish the source code on the
condition that the copyright notices are left intact. You are also
free to incorporate CakePHP into any Commercial or closed source
application.
IANAL, but I think that the license that applies to CakePHP could possibly apply to your tool as well.