A couple months ago, I wrote a blog Introducing Cakecutter, which was, essentially, a modular version for create-python-project. Both of these projects were very easy, because they were just simple projects for me to practice the Rust programming language. I made them and forgot about it. But little did I know, small projects go a long way.
But then, a couple days ago, Yash (who is a fellow admin of the Coding Horizon community and an amazing developer), texted me, saying that he sees a lot of potential in my little pet project.
āCakecutter is cool, letās make it betterā
And thatās exactly what we did.
We discussed new things we can implement, and decided to rewrite the entire thing in Golang
Ok, but what exactly is Cakecutter?
In a nutshell, Cakes are templates, which contain everything you need to set up a project. This includes:
The file structure of a project (for eg. some boilerplate files, README, src/ folder) [DOCS]
File content (for eg. Pre-generated licenses, or boilerplate code) [DOCS]
Commands to set up a project (for eg. Downloading dependencies, creating virtual environment) [DOCS]
Additionally, questions can be asked when setting up a project. Questions can be a selection between multiple things, or an input. Then, the answers to the questions can be used to fill in a template. [DOCS]
An example use case for this would be, asking the name of a user to auto-generate license, or you can even generate an entire README file with it!!
You can create files based on answer to a question, for example, creating a file only if the project is a typescript project.
And, you can even run commands based on answers. Example use case would be asking host OS to run setup commands!
This is a hell lot of power and functionality in just ONE CakeFile! (Just like real cakes š)
Open source, cross-platform developer tool that helps you quick-start your project. Creates files, runs commands, templating based on question. Also works as a setup tool
Cakecutter
Create projects from pre-built cakes (templates) in seconds!
Sometimes, the most difficult thing is to just get started with a project. Cakecutter is a tool that helps you to cut the cake and start your amazing project instantly.
What Cakecutter does:
Users can publish, create or use a cake from Cakes.run. Cakes are basically TOML files which contain all the information needed to create a project.
According to the information in the Cakefile, Cakecutter will create all the files and (you can also fill them with content) in the correct location.
Setup commands (installing dependencies, etc.) can be defined in the Cakefile. These commands are run after the files are generated.
Cakecutter can ask questions to the user and take input. The input can then be used as variables for the project template. Read the docs here