A valid recipe starts with a header, which is created or updated automatically when saving the recipe. This header contains the chef identity and spice, title, description and interface colors.


  "recipe_version": "1.7",
  "title": "Default script",
  "description": "Tests of the available functions within magnetron",
  "tags": "default",
  "chef": "BeatRig",
  "dependencies": "curl",
  "calls": ["/usr/bin/tar"],
  "spice": "BQ==:G+Hy36kJcnQQ....A/v69iLn6N2IH0XzIZwTGdHSo4=",
  "flavour": "bbWXKPLrYch52r.....q",
  "core_version": "0.4.0",
  "magnetron_version": "1.0.139",
  "functions": "main,onConfig,onAbout",
  "uuid": "5dc4b3fe2a474b29a2d7....7136fc",
  "instructions": "",
  "type": "default",
  "os": "windows",
  "palette": "Clean Slate",
  "ignore_dependencies": ""

Recipe header values

When saving a recipe a dialog with each value needed will appear.

the smallest denominator will be increased automatically through this dialog. it can handle 1 major plus 2 optional sub versions. ie. 1.2.3

"title" "description" and "instructions"
these properties are self descriptive strings and should be kept as short as possible. More and detailed information can be shared via the 'onAbout' callback function.

is a comma separated string used to cluster large sets of recipes in groups. (use video, audio, a collection name etc). and is used within recipe search.

helps to make a recipe recognizable.
property does this as well, it should contain an optional link to a online jpeg or png file. It can be used to display information or artwork. The image will be scaled down if needed and cached for local use in the content folder.

property will indicate on which platforms the recipe works.

property should be 'default' in most cases. Unless a tool installer or demo recipe is made.

is only used for recipes with the "type" set to "installer" to indicate which 'cmd' it installs.

called cmd dependencies, is an auto filled comma separated string of whitelisted applications are used in this recipe.

a comma separated list of items from dependencies which will be ignored when checking for installed tools, only used for exceptions.

is an auto filled array of paths of calls made directly to executable files.

"magnetron_version" and "core_version"
numbers are inserted automatically to ensure compatibility.

is the epoch save time.

is auto filled and will indicate which callback functions are used to interact with the end user.

is a unique code which should stay unchanged across new versions of the same recipe. This recipe update process will be smoother.

"chef" "spice" and "flavour"
are very important in the Magnetron header, these are the tokens for others to verify the chef of which the recipe came from. More on that below.

recipe save header dialog
recipe save header dialog

Spice and flavour

Spices are a digital trust system based on their unique code. Running scripts from unknown sources is risky, therefore each recipe contains a header with a spice code from a specific chef. This ensures the user knows the recipe comes from a trusted source. Adding the spice results in a unique mathematical code called 'flavour' that is inserted into the recipe header.

Magnetron app will prompt the user if it does not recognize the unique spice. Or it will reject the recipe if the mathematical proof of the flavour is incorrect.

Chef's secret spice

A spice is created once by each recipe maker, the chef. Each chef uses their spice when making recipes in magnetron.dev. Note that the spice contains a public and a secret part which should be backed up. Do this by exporting the spice and keeping the data safe (!)

The 'flavor' code in the recipe headers are unique to the content of the recipe, as it is combined with the spice. If the spice is unknown to the user or if the flavor doesn't taste 100%  right, Magnetron will not run the recipe.

Create spice

Create a spice by first creating a recipe and then clicking the smiley in the bottom left. Select the 'create spice' option in the pop up menu. Make a backup of this spice by exporting it. You can import it elsewhere or use it as recovery by importing it in the smiley pop-up menu.