Synsema docsENES

Quickstart

Synsema ships as a single static binary — no Python, no Node, no runtime to install.

Install

macOS / Linux:

curl -fsSL https://synsema.com/install.sh | sh

Windows (PowerShell):

irm https://synsema.com/install.ps1 | iex

Check it:

synsema version

Hello, world

Put this in hello.syn:

hello-world.syn
-- Doc example: your first Synsema program. Comments in English (universal code).
intent: "doc example: hello world + a tiny task"

task greet(name)
    give "Hello, " + name + "!"

print(greet("World"))                 -- run shows: Hello, World!

test "greet builds a friendly message"
    assert_eq(greet("World"), "Hello, World!")
    assert_eq(greet("Synsema"), "Hello, Synsema!")

Run it:

synsema run hello.syn

synsema run executes a file; synsema test runs its test blocks; synsema check parses without running.

Your first HTTP server

Synsema has a production HTTP server built in — no framework to add. Everything is deny-by-default, so you declare what the program may do with require.

require serve(8080)

serve on 8080
    route "GET /hello"
        give {"msg": "hi"}
synsema serve app.syn          # → http://127.0.0.1:8080/hello

Your first LLM call

The LLM is a built-in primitive. Put your provider key in .env (it is never exposed to the program), then:

require llm

let summary be generate "a one-line summary" given report
let action be decide between ["approve", "reject"] given request

The result of a decide is validated to be one of the options — with automatic retries. See LLM in the sidebar for native ops and for calling a provider's HTTP API directly.

Next