Cakecutter - a utility tool that quickly sets up a project from a pre-built template

Related tags

Utilities Cakecutter
Overview

Cakecutter


Create projects from pre-built cakes (templates)! Supports files, packages, content, running commands and more!

Cakecutter is a utility tool that quickly sets up a project from a pre-built template.

All template files are in .toml format, which means they are easy to edit and share with others.

Here's a python project demo

Notice how it created the files and ran the VENV command to initialise the virtual environment, and started installing the dependencies Demo

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

Installation

cargo install cakecutter 

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

Making your own Cakefile

It's really easy to make your own cakefile. There are 4 main sections:

[metadata]

[filestructure]

[content]

[commands]

Basic rules

Since TOML doesn't support . and / as keys, we use - and -- instead.

so instead of main.py, we use main-py and instead of src/main.py we use src--main-py

Metadata

Metadata is optional, but when you include it, make sure to include the following:

  • name: The name of your cake
  • version: Cake version
  • description: What the cake is for
  • author: The author of Cake

File structure

The file structure is where you define the structure of your project.

To include files in the current directory, put them in the root list root = [".gitignore", "Cargo.toml", "README.md", "LICENSE"]

For every other directory, use the following syntax: directory_name = [file1, file2] So for this repository, it looks something like

root = [".gitignore", "Cargo.toml", "README.md", "LICENSE"]
examples = ["Python.toml"]

Content

Content is where you define the content of your files. It's pretty simple, just write the name of file (following the basic rules) and the content of the files after it

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

This will fill in the file src/main.py with the content of the string.

Commands

These are the commands that run when a cake is made (Stuff like installing dependencies)

All keys here should be numbers starting from one and increasing progressively.

Commands should be written as if written in a Dockerfile

Here's an examples:

[commands]
1 = ['python', '-m', 'venv', 'venv']
2 = ['pip', 'install', '-r', 'requirements.txt']
3 = ['python', 'src/main.py']

License

This project is licensed under the mit license

Show your support

Leave a if you like this project


Readme made with 💖 using README Generator by Dhravya Shah

You might also like...
Keyscope is a key and secret workflow (validation, invalidation, etc.) tool built in Rust
Keyscope is a key and secret workflow (validation, invalidation, etc.) tool built in Rust

✅ Automate your key and secret validation workflows 🤠 Over 30 different providers 🤖 Export to JSON, audit via CSV 🔑 Keyscope Keyscope is a key and

Awesome full-stack template using Yew and Rust
Awesome full-stack template using Yew and Rust

Docker + Actix + Yew Full Stack Template 👨‍💻 YouTube videos Full Stack Rust App Template using Yew + Actix! https://youtu.be/oCiGjrpGk4A Add Docker

Next.js + Rust template
Next.js + Rust template

Next.js + Rust template Learn how to use Rust in your existing JavaScript/Next.js projects and discover how to deploy Rust to production on Vercel. Yo

Batch rename utility for developers
Batch rename utility for developers

nomino Batch rename utility for developers How to install Pre-Compiled You can download a pre-compiled executable for Linux, MacOS and Windows operati

A small utility for tracking the change in opening and closing of issues in a GitHub repo

A small utility for tracking the change in opening and closing of issues in a GitHub repo. This tool can be used to build visualizations for issue triage over time with the hope of motivating closing more issues than are opened.

mdTranslation is a utility to prepare multi-lingual Markdown documents.

mdTranslation is a utility to prepare multi-lingual Markdown documents. There's also a mdBook preprocessor called mdbook-translation for

ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust.
ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust.

gigagei ᎩᎦᎨᎢ (IPA: [gigagei]) is a random quote fetching console utility. Written in Rust. Installing Use latest pre-built binary from releases Buildi

Utility library to work with tuples.

Utility library to work with tuples.

A fast, multi-threaded line counting utility written in Rust.

xloc A fast, multi-threaded line counting utility written in Rust. What is xloc A drop in replacement for bash's wc -l. Your project has x lines of co

Owner
Dhravya Shah
Hi, I'm Dhravya (aka SpaceDoggo) ! 👋 I am a 16 year old interested in software development. I am mainly specialised in Python, javascript and tailwindcss
Dhravya Shah
Mirror of oxipng for pre-commit.

oxipng pre-commit mirror Mirror of oxipng for pre-commit. Installation Add to your pre-commit config: - repo: https://github.com/adamchainz/pre-comm

Adam Johnson 11 Jan 15, 2022
A partial reimplementation of pre-commit in Rust

preco A partial reimplementation of pre-commit in Rust. Important Heavily just a proof-of-concept and work-in-progress. There are bits that could prob

Aarni Koskela 8 Feb 22, 2024
Devmode is a project management utility for developers.

Dev(mode) Dev(mode) is a project management utility for developers.

Eduardo Flores 15 Dec 11, 2022
A cli utility written in Rust that allows fetching all the labels of a project, save those as a YAML file

A cli utility written in Rust that allows fetching all the labels of a project, save those as a YAML file that you can easily edit or save as backup and apply a saved preset to new repositories.

Chevdor 4 May 5, 2022
Rust crate that provides a convenient macro to quickly plot variables.

Debug Plotter This crate provides a convenient macro to quickly plot variables. Documentation For more information on how to use this crate, please ta

Fabian Bösiger 82 Dec 31, 2022
Quickly mint NFT(able)s port forwards remotely

Easy expose A really simple way to expose some service behind a NAT, similar to rathole and frp. WARNING: This does not secure the channel, or even do

Ben Simms 3 Dec 3, 2022
Tracing layer to quickly inspect spans and events

tracing-texray First, a word of warning: This is alpha software. Don't run this in prod or anywhere where a panic would ruin your day. tracing-texray

Russell Cohen 23 Dec 3, 2022
A Zellij plugin for quickly searching and switching tabs 🖤

?? room A Zellij plugin for quickly searching and switching between tabs. Usage Tab to cycle through tab list Up and Down to cycle through tab list En

Lucas 15 Jul 11, 2023
Zellij plugin to quickly navigate your panes (clone of nvim's harpoon)

harpoon A Zellij plugin for quickly searching and switching between tabs. Copy of the original harpoon for nvim. Usage a to add pane to list Up and Do

null 13 Aug 11, 2023
A tool that generates a Sublime Text project file that helps you get started using Scoggle.

README A tool that generates a Sublime Text project file that helps you get started using Scoggle. While Scoggle-Gen may not find every single source

Sanjiv Sahayam 0 Jan 10, 2022