accrete
Docs / How-to guides / Add a tool with a recipe

How-to guides

Add a tool with a recipe

A recipe tells accrete which package to build and how to check the build. You do not need a recipe to use the Pi extension or the CLI, because they write one for you. Write one by hand when you want a stable tool name or a custom check case.

1. Write the recipe

{
  "name": "sass",
  "packages": { "sass": "1.80.6" },
  "cli": { "package": "sass", "bin": "sass" },
  "entry": "",
  "native": { "bin": "sass", "args": ["--no-source-map", "a.scss"] },
  "check": {
    "args": ["--no-source-map", "a.scss"],
    "files": { "a.scss": "$c: #f38020;\n.a { color: $c; }\n" }
  }
}

2. Send it

curl -X PUT "$ACCRETE_URL/recipes" \
  -H "Authorization: Bearer $ACCRETE_TOKEN" \
  -H "content-type: application/json" \
  --data @sass.recipe.json

3. Use it

Call the tool by its name in a task. The first call builds it; see HTTP API.

If the build is rejected

accrete returns an error and does not list the tool when:

The tool then stays a container tool. See Limits.

Full field list: Recipe format.

Edit this page