Introducing Cakecutter🍰- Start projects quickly from Cakes (templates)

After I posted the create-python-app blog, a member of the dev community (@abhinav1217) suggested me to modularize it – so that people can write all sorts of templates and can do all sorts of stuff with it.

This was an amazing idea for me. I started t…


This content originally appeared on DEV Community and was authored by DEV Community

After I posted the create-python-app blog, a member of the dev community (@abhinav1217) suggested me to modularize it - so that people can write all sorts of templates and can do all sorts of stuff with it.

This was an amazing idea for me. I started thinking about the implementation right away. Here's what I came up with - Cakecutter.

Cakecutter is a utility tool that helps you to create new projects quickly from pre-built cakes - The cakes can be as insane as your imagination, with multiple files, boilerplate code, command runs, etc. (More to be added soon, but I'm not sure what I should add)

All Cakefiles (The file that act as templates) are easily shareable and can be made by beginners because of the easy syntax of TOML (tom's obvious, minimal language).

According to the Cakefile, the rust script automatically generates the project for you, almost instantly, and runs any commands in a chronological order. Here's a Demo:
Demo

(Notice how it initialised venv and ran requirements.txt)

Cakefiles are incredibly easy to configure, here's a simple file that generates a python project (same as create-python-project)

[filestructure]
root = ['.gitignore', '.env', 'requirements.txt', 'README.md', 'LICENSE']
src = ['main.py']

[content]
src--main-py = """
print("Hello World")
"""

-gitignore = """
target/
.env
venv/
"""

requirements-txt = """requests"""

[commands]
1 = ['python', '-m', 'venv', 'venv']
3 = ['python', 'src/main.py']

So you can write multiple cakefiles for yourself (according to your needs, for different languages) and run them every time you start a project. Add a Cake.toml file in your github repository to encourage others to use the cakefile and the project as a template!

Features

  • Create projects from pre-built cakes (templates) and make your own!
  • Supports all languages (Python, Js, Rust, Go, you name it.)
  • Cross-platform
  • Super fast ⚡
  • Get Cakes from github or use local Cakefiles

Usage

cakecutter [TEMPLATE_NAME]

You can also use cakes from github (Provided they have a Cake.toml file in the root directory of the repository):

cakecutter https://github.com/dhravya/cakecutter

I'll add example templates (For python, js, etc. ) soon. Feel free to comment your thoughts below!

  • What more can I add?
  • What should python, js, rust, etc. templates have?
  • Would you use it in your everyday lives?

The project is super duper light ,a little more than 40 kbs so don't worry about that either


This content originally appeared on DEV Community and was authored by DEV Community


Print Share Comment Cite Upload Translate Updates
APA

DEV Community | Sciencx (2022-03-09T05:17:36+00:00) Introducing Cakecutter🍰- Start projects quickly from Cakes (templates). Retrieved from https://www.scien.cx/2022/03/09/introducing-cakecutter%f0%9f%8d%b0-start-projects-quickly-from-cakes-templates/

MLA
" » Introducing Cakecutter🍰- Start projects quickly from Cakes (templates)." DEV Community | Sciencx - Wednesday March 9, 2022, https://www.scien.cx/2022/03/09/introducing-cakecutter%f0%9f%8d%b0-start-projects-quickly-from-cakes-templates/
HARVARD
DEV Community | Sciencx Wednesday March 9, 2022 » Introducing Cakecutter🍰- Start projects quickly from Cakes (templates)., viewed ,<https://www.scien.cx/2022/03/09/introducing-cakecutter%f0%9f%8d%b0-start-projects-quickly-from-cakes-templates/>
VANCOUVER
DEV Community | Sciencx - » Introducing Cakecutter🍰- Start projects quickly from Cakes (templates). [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/09/introducing-cakecutter%f0%9f%8d%b0-start-projects-quickly-from-cakes-templates/
CHICAGO
" » Introducing Cakecutter🍰- Start projects quickly from Cakes (templates)." DEV Community | Sciencx - Accessed . https://www.scien.cx/2022/03/09/introducing-cakecutter%f0%9f%8d%b0-start-projects-quickly-from-cakes-templates/
IEEE
" » Introducing Cakecutter🍰- Start projects quickly from Cakes (templates)." DEV Community | Sciencx [Online]. Available: https://www.scien.cx/2022/03/09/introducing-cakecutter%f0%9f%8d%b0-start-projects-quickly-from-cakes-templates/. [Accessed: ]
rf:citation
» Introducing Cakecutter🍰- Start projects quickly from Cakes (templates) | DEV Community | Sciencx | https://www.scien.cx/2022/03/09/introducing-cakecutter%f0%9f%8d%b0-start-projects-quickly-from-cakes-templates/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.