I’m the type of person who is constantly working on open source projects. But whenever I create a new repository, I haven’t yet decided what license I should put the code under. So, I always had to add it at the end when I have pushed all the code. But it was just too much work: go to GitHub, click
Create File, type
LICENSE, choose the license and then push it and finally pull the changes locally. So I decided to make a CLI License Generator, in Rust.
This was a nice project to build since I hadn’t written Rust code in a while, so it was a good refresher.
It’s as simple as that, it even automatically gets your username from your global git config file!
Here’s the source code: nexxeln/license-generator.
cargo install gen-license
If you don’t have cargo installed, you can download the executable from the releases section of the GitHub repository.
That’s pretty much it! Thank you for reading this far. If you want me to explain some of the code behind this, feel free to ask in the comment section.
Please do give your feedback and leave a star on GitHub if you liked it!