DEV Community

Cover image for A whole new developer ecosystem: CakeCutter 🍰

A whole new developer ecosystem: CakeCutter 🍰

Dhravya on June 17, 2022

A couple months ago, I wrote a blog Introducing Cakecutter, which was, essentially, a modular version for create-python-project. Both of these proj...
Collapse
 
yxsh profile image
Yash • Edited

sorry its not npx cc
its

npx cakecutter
Enter fullscreen mode Exit fullscreen mode

and for mac -

npx cc-for-mac
Enter fullscreen mode Exit fullscreen mode

and linux

npx cc-for-linux
Enter fullscreen mode Exit fullscreen mode

but its preferred to install it first

npm install -g cakecutter/cc-for-mac/cc-for-linux
Enter fullscreen mode Exit fullscreen mode

then

cc cut ...
Enter fullscreen mode Exit fullscreen mode

sorry for the inconvenience caused

Collapse
 
bovermyer profile image
Ben Overmyer

If it’s written in Go, what are the npx/m commands for?

Collapse
 
yxsh profile image
Yash • Edited

We published the package as a binary executable to npm.

Not everyone has go installed, and almost everyone has npm

Thread Thread
 
bovermyer profile image
Ben Overmyer

Fair enough. Have you considered maintaining a Homebrew package for it? I'll try it out by installing with Go myself, but Homebrew would be easier, and less icky than npm.

Thread Thread
 
yxsh profile image
Yash

Yes.. We were gonna publish it on homebrew, scoop and conda-forge

but once we found out that you can publish binary executables on npm. We published it there are thought it should be enough.

And we also did tried publishing it on scoop but the request got rejected because the project was very nee

Collapse
 
yxsh profile image
Yash

Here are some features that we currently have in mind. feel free to share your own and give feedback about these

Extensions

Extensions will be a list of other published cakes or maybe even local cakes.

[metadata]
name = "..."
description = "..."
exts = ["readme","license"]
Enter fullscreen mode Exit fullscreen mode

these exts will be run before the actual cake. So you don't have to write extra code. and ask the questions.

Data Gatherers

Data gatherers are kinda like questions but they are not asked. They are commands which runs to gather data. like suppose you wanted to get the user's git username you can run git config --get user.name :-

[gatherers]
id-of-gatherer = "git config --get user.name"
Enter fullscreen mode Exit fullscreen mode

Before creating the template these commands will be run and there output will be saved. and u can use them just like questions

Collapse
 
fjones profile image
FJones

How are you sandboxing the commands? Seeing as how we've had a variety of install-script-based attacks on the npm platform lately.

Collapse
 
yxsh profile image
Yash • Edited

if u have an idea please suggest!

Collapse
 
yxsh profile image
Yash • Edited

aahh you u can run anything rn

maybe if we list the commands that will be ran, in the cake page...

Collapse
 
pandademic profile image
Pandademic

Hey! I'd like to help and to contribute , now that it's in go. I don't really know rust , but go is my bread and butter. You seem not to have contributing guidelines on github , so is their anyway I can help?

Thanks!

Collapse
 
dhravya profile image
Dhravya

You can! We're working on creating issues, setting up future plans and also setting up contribution guidelines for everyone.

Thanks for showing interest in our project! till then, if you find any bugs, or can think of any features to implement or, in general, think that anything can be better, kindly create an issue

Collapse
 
abhinav1217 profile image
Abhinav Kulshreshtha

Great to see it come alive.

Collapse
 
allanchain profile image
Allan Chain

It looks pretty much like cookiecutter. Could you tell us more about the difference?

Collapse
 
dhravya profile image
Dhravya

It's like our own implementation of Cookiecutter, but instead of the templates being stored in git repositories, they are stored as single files in our own database, with a central platform to find and use the "cakes"

Also, our implementation is faster

Collapse
 
nexxeln profile image
Shoubhit Dash

exciting stuff!