Skip to content
Anchor Code

Getting started Your first recipe

Prototype updated 2026-10-10

Your first recipe

What the prototype in Anchor accepts today, and how that differs from the draft of the future language.

There are two separate blocks here, and they must not be mixed up. The first is what the prototype understands right now. The second is how the language might look later.

What the prototype understands today

The prototype of the Build panel parses a very narrow form: a recipe declaration with a quoted name, and dependencies with quoted names. It checks that brackets are balanced and builds a dependency graph for preview. It does nothing else.

One script file holds one recipe declaration, so below are two separate files.

File CheckGit:

recipe "CheckGit" {
    // Prototype: no real Git action is performed here.
}

File BuildShops:

recipe "BuildShops" {
    dependsOn("CheckGit")
    // The prototype does not execute the rest of the text.
}

What the prototype does not do: it does not call methods, does not read server or client, does not write files, and does not build or install anything. The editor also has no hints, highlighting or type checking yet.

How it might look in the future (draft)

// DRAFT. Does not run. Names and syntax are not approved.
recipe BuildLcoin {
    dependsOn(GenerateShops);

    GenerateShops.output
        .select(server.shops.lcoin.id)
        .replaceIn(client.dat.shopProducts);
}

The differences from the prototype are easy to see: names without quotes, a semicolon, and method calls on the server and client objects. Which of these forms survives is for the owner to decide after discussion.

What next

↑↓ select · Enter open · Esc close