Elm's safety. Go's reach. One binary for the whole stack.

If it compiles, it works. Sky is a typed functional language with Elm syntax that compiles to Go. No nulls, no exceptions, and every effect is a typed Task. One codebase runs as a web app, a wasm client, a terminal UI, a CLI, or a desktop and mobile app. You need Go 1.25 or later on your PATH.

curl -fsSL https://raw.githubusercontent.com/anzellai/sky/main/install.sh | sh
Main.sky
module Main exposing (main)

import Std.App as App
import Std.Ui as Ui exposing (Element)
import Std.Ui.Font as Font

type alias Model = { count : Int }
type Msg = Increment | Decrement | Reset

init _ = ({ count = 0 }, Cmd.none)

update msg model =
    case msg of
        Increment -> ({ model | count = model.count + 1 }, Cmd.none)
        Decrement -> ({ model | count = model.count - 1 }, Cmd.none)
        Reset     -> ({ model | count = 0 }, Cmd.none)

view : Model -> Element Msg
view model =
    Ui.column [ Ui.spacing 16, Ui.padding 24 ]
        [ Ui.el [ Font.size 48, Font.bold ]
            (Ui.text (String.fromInt model.count))
        , Ui.row [ Ui.spacing 8 ]
            [ Ui.button [] { onPress = Just Decrement, label = Ui.text "-" }
            , Ui.button [] { onPress = Just Reset,     label = Ui.text "reset" }
            , Ui.button [] { onPress = Just Increment, label = Ui.text "+" }
            ]
        ]

app =
    App.app
        { init = init, update = update
        , view = view, subscriptions = \_ -> Sub.none
        }
        |> App.withNotFound ()

-- web is the default target; sky build --target terminal:tui,
-- terminal:cli, desktop or web:app retargets this same app.
main = App.run app

One model. Five runtimes.

One App.app — the same init / update / view — runs on five runtimes. Pick with a build-time --target, no view-code changes:

Sky.Live — server-driven web UI with DOM diffing over SSE, persistent sessions, async Cmd.perform

Sky.Spa — the same loop compiled to wasm on the client — web, desktop, iOS, Android from one source (experimental)

Sky.Tui — same Element tree rendered to ANSI cells in a terminal (logical-pixel canvas, mouse + scroll)

Sky.Cli — line-oriented stdin event loop for non-interactive shells

Sky.Webview — native desktop window on the system webview, sharing Sky.Live's renderer (macOS today)

Same view, five runtimes

Std.Ui is a typed, no-CSS layout DSL. Pass one build-time --target to retarget — web, terminal, CLI, desktop — with zero changes to view, update, or model. And with Sky.Spa (--target web:app) the same loop compiles to wasm on the client, shipping to web, desktop, iOS and Android from one source.

Sky.Live
web
import Std.App as App

app =
    App.app
        { init = init, update = update
        , view = view, subscriptions = subs
        }
        |> App.withNotFound ()

main = App.run app

$ sky build            -- web (default)

HTTP + SSE wire. Persistent sessions across deploys (memory / SQLite / Redis / Postgres). Async Cmd.perform goroutines. Input-authority protocol preserves typed input across re-renders.

Sky.Spa
wasm
-- the very same `app` — no new entry point,
-- no Std.Spa import. Just retarget:

main = App.run app

$ sky build --target web:app
--   desktop:mac | mobile:ios | mobile:android

The same TEA loop compiled to GOOS=js GOARCH=wasm — runs on the client. `sky run` auto-splits one project into a wasm frontend + a stateless backend + a shared codec (no hand-written boundary). Ships to web, desktop, iOS and Android; Std.Native exposes device APIs (clipboard, camera, geolocation) and Native.bridge extends them. Experimental.

Sky.Tui
terminal
-- the very same `app`, retargeted —
-- the Element tree renders to ANSI cells:

main = App.run app

$ sky build --target terminal:tui

Render Element trees to ANSI cells. Logical-pixel canvas (1280×720 default), mouse left-press + scroll wheel, wide chars + emoji via grapheme-cluster width. Diff renderer; no flicker.

Sky.Cli
stdin
-- the very same `app`, retargeted —
-- a line-oriented loop for non-TTY shells:

main = App.run app

$ sky build --target terminal:cli

Line-oriented event loop for non-TTY shells. Same TEA shape; view returns a string each turn. Echo-suppressed password reads via Cli.readPassword for auth flows.

Sky.Webview
desktop
-- the very same `app`, retargeted —
-- Sky.Live's renderer in a native window:

main = App.run app

$ sky build --target desktop

Native desktop window on the system webview, reusing Sky.Live's renderer and VNode diff so the same Std.Ui tree renders identically. macOS is smoke-validated today; Windows and Linux build but are untested. Requires cgo.

Sky.Spa — one source, every platform

The 64-spa-native example — clipboard, files, camera and geolocation via Std.Native, plus Native.bridge to add your own — built once and running on web, iOS and Android. Experimental.

Sky.Spa on Web + Desktop
Web + Desktop
Sky.Spa on iOS
iOS
Sky.Spa on Android
Android
Where are you coming from?
Elm or Haskell

Elm syntax and The Elm Architecture, now on the server, in the terminal and on the desktop. Effects are typed Tasks, not ports.

Go

Typed Go comes out. sky add turns any Go module into typed Sky bindings. A Go error, nil or panic arrives as an Err.

Node, Python or Java

No node_modules, no virtualenv, no JVM. One binary to copy to a server. Errors are values, so a case you forgot fails the build, not a request.

AI-assisted coding

Strict types catch what the model gets wrong. Every sky init project ships AGENTS.md and CLAUDE.md. sky doc gives exact signatures, and sky check --format json gives machine-readable errors.

What you get
If it compiles, it works

Hindley-Milner type inference, exhaustive pattern matching, no null, no exceptions. Undefined names caught at compile time with line:col positions.

Single binary

Compiles to a native Go binary. Your full-stack app, with its API, database and UI, ships as one file. No node_modules, no virtualenv, no JVM. sky build --embed can put PostgreSQL inside the binary, and an app plus its database fits in 1 GB.

Multi-backend UI

Std.Ui is a typed no-CSS layout DSL. The same view renders to a server-driven web app (Sky.Live), a client-side wasm app (Sky.Spa), a terminal UI (Sky.Tui), a stdin loop (Sky.Cli), or a desktop window (Sky.Webview). One model, five runtimes.

Go ecosystem

sky add turns any Go module into typed Sky bindings, with no glue code to write. A Go error, a nil or a panic arrives as an Err, never a crash. The Stripe SDK, about 76,000 symbols, builds this way.

Type-directed lowering

The compiler propagates HM types into lambda bodies, record fields, list elements, and call args — so callback fields keep their typed callee param (no func(any) any fallback). Parametric records compile to Go generics.

Batteries included

Std.Db on SQLite or PostgreSQL with the same code, Std.Auth, Std.Money on exact decimals, Std.Durable workflows, one Std.Codec for JSON, XML and tables, an HTTP server, a formatter and an LSP. Testing too: sky fuzz folds random messages through your update with no oracle to write, mock-by-default runs scenarios offline, and sky doc --diagram draws C4 and data-flow diagrams from the typed source.

Durable AI agents

Std.Ai runs an LLM agent as a durable workflow: every model call is a journalled step, exactly-once across a restart, so a crash never re-bills the model. The model only proposes a typed action. A pure Policy firewall decides, and only Allow runs the effect. Cost is tracked in Std.Money. Since v0.28 Std.Ai also covers datasets, evals, a model registry, LoRA training, GPU serving and on-device models.

Office files, Xml and Zip

Std.Office.Xlsx and Std.Office.Docx read and write Excel and Word files. Std.Xml and Std.Zip read hostile input safely. Codec now drives XML as well as JSON and tables. New in v0.29.

Draw images on the server

Std.Image.Canvas draws shapes, masks, blur and text with TrueType fonts, then writes PNG, JPEG, GIF or lossless WebP. Std.Image reads and writes animated GIF and resizes every frame. New in v0.29.

One entry point: Std.App

Write App.app once with init, update and view. A build-time --target picks the runtime: web, web:app, terminal:tui, terminal:cli, desktop, mobile:ios or mobile:android. You never import the backend yourself.

Faster saved models

Since Sky 0.29.9 the compiler generates a typed encoder and decoder for a Codec.auto record. A 1 MB saved model encodes about 5 times faster in the browser, and a client keeps up to 3 MB. Since 0.29.3 an update reuses unchanged model data and view results where safe.

Scroll after a step renders

Return a typed Std.Nav scroll command from update. It runs after the matching DOM commits, including a server answer, and uses the nearest vertical scroll container without changing the address.

Fast collections, clear recursion

v0.29 speeds up List and Dict operations, adds the Regex.Match type with positions and capture groups, and lets let-bound functions call each other (mutual recursion).

See it in action
STD.UI FORMS
-- Typed onSubmit decodes formData
-- straight into the Msg's record arg
Ui.form [ Ui.onSubmit DoSignIn ]
    [ Ui.input [ Ui.name "username" ]
    , Ui.input [ Ui.name "password"
        , Ui.htmlAttribute "type" "password" ]
    , Ui.input [ Ui.htmlAttribute "type" "submit" ]
    ]
PATTERN MATCHING
describe shape =
    case shape of
        Circle r ->
            "circle r=" ++ String.fromFloat r
        Rectangle w h ->
            "rect" 
DATABASE (ONE CODEC)
todos : Store Todo
todos =
    Store.fromCodec "todos" (Codec.auto { id = 0, title = "" })
        |> Store.serial "id"


addTodo : Db -> String -> Task Error (List Todo)
addTodo db title =
    Store.insert db todos { id = 0, title = title }
        |> Task.andThen (\_ -> Store.all db todos)
ASYNC COMMANDS
-- Run tasks in background goroutines
update msg model =
    case msg of
        FetchData ->
            ( model, Cmd.perform
                (Http.get "/api") GotData )
CONCURRENCY
-- Parallel HTTP requests (goroutines)
fetch =
    Task.parallel
        [ Http.get url1
        , Http.get url2
        ]
        |> Task.andThen handleAll
GO INTEROP
import Github.Com.Stripe.StripeGo.V84 as Stripe

-- whole-program DCE keeps only the
-- symbols you call (76k available)
customer email =
    Stripe.newCustomerParams ()
        |> Result.andThen
            (\p -> Stripe.customerParamsSetEmail (Just email) p)
AGENT FIREWALL
firewall : Policy.Action -> Policy.Decision
firewall act =
    Policy.requireApprovalAbove Policy.Low act


send : Ticket -> String -> Task Error String
send ticket reply =
    Policy.gate
        firewall
        (Policy.action "email.send" ticket.customer Policy.Low)
        (deliver ticket reply)
        |> Task.map outcome
74
Examples
1
Binary for the whole stack
5
UI backends
Rust
Compiler (single binary)
Built with Sky Lang

Standalone tools, libraries, and full applications.

SkyShop
Sky.Live

E-commerce app with Stripe payments, Firebase auth, Firestore, i18n, Tailwind CSS. Full Sky.Live TEA architecture with async commands.

examples/13-skyshop ->
SkyChess
Sky.Live

Chess game with negamax AI, SQLite persistence, and SSE real-time updates. Full move validation, castling, en passant, promotion.

examples/16-skychess ->
sky-env
CLI

Encrypted environment variable manager. AES-256-CBC SQLite, portable across machines, six commands. Single 8MB binary.

github.com/anzellai/sky-env ->
sky-tailwind
Library

Tailwind CSS utility classes for Sky.Live apps. Type-safe, composable, zero-runtime — class names checked at compile time.

github.com/anzellai/sky-tailwind ->
SkyVote
Sky.Live

Roadmap voting app — Sky.Live, Std.Auth (bcrypt + sessions), Std.Db (SQLite), email verification, key rotation.

examples/12-skyvote ->
SkyMon
Sky.Live

Service monitoring dashboard with metrics, alerts, and incident timeline. Real-time updates via SSE subscriptions.

examples/17-skymon ->
SkyForum
Std.Ui

Reddit/HN-style forum on the typed no-CSS layout DSL. Per-user vote tracking, threaded comments, password-manager-friendly forms.

examples/19-skyforum ->
Get Started in 30 Seconds

Install Sky (needs Go 1.25 or later). Bootstrap your first project. Ship a single binary.

curl -fsSL https://raw.githubusercontent.com/anzellai/sky/main/install.sh | sh
sky init my-app
cd my-app
sky run
SKY
LANG
Apache 2.0 License