{"id":47613079,"url":"https://github.com/anzellai/sky","last_synced_at":"2026-07-05T03:01:57.083Z","repository":{"id":345769251,"uuid":"1178160193","full_name":"anzellai/sky","owner":"anzellai","description":"Sky — an Elm-inspired language that compiles to Go. Hindley-Milner types, server-driven UI (Sky.Live), single binary output.","archived":false,"fork":false,"pushed_at":"2026-06-30T15:14:48.000Z","size":266725,"stargazers_count":416,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-06-30T15:18:03.077Z","etag":null,"topics":["compiler","compiles-to-go","elm","elm-inspired","fullstack","functional-programming","go","haskell","liveview","lsp","production-ready-application","programming-language","server-driven-ui","sky","sky-lang","sky-language","sse","type-inference","typescript"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anzellai.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-10T18:45:31.000Z","updated_at":"2026-06-29T15:10:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"3e808c30-4077-40d6-bb82-fd66071948ae","html_url":"https://github.com/anzellai/sky","commit_stats":null,"previous_names":["anzellai/sky"],"tags_count":222,"template":false,"template_full_name":null,"purl":"pkg:github/anzellai/sky","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzellai%2Fsky","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzellai%2Fsky/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzellai%2Fsky/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzellai%2Fsky/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anzellai","download_url":"https://codeload.github.com/anzellai/sky/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anzellai%2Fsky/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35141966,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-05T02:00:06.290Z","response_time":100,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","compiles-to-go","elm","elm-inspired","fullstack","functional-programming","go","haskell","liveview","lsp","production-ready-application","programming-language","server-driven-ui","sky","sky-lang","sky-language","sse","type-inference","typescript"],"created_at":"2026-04-01T20:48:57.737Z","updated_at":"2026-07-05T03:01:57.064Z","avatar_url":"https://github.com/anzellai.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Sky\n\n[sky-lang.org](https://sky-lang.org) · [Docs](docs/) · [Examples](examples/)\n\n\u003e **Status: v0.17.x release candidate.** Public APIs are stable for the\n\u003e v1.0 line; minor versions ship features additively. Internals can\n\u003e still change between minor versions. v0.17.0 closes the typed-emit\n\u003e soundness floor under the reframed \"rock solid + ~100% sound with\n\u003e documented surface for remaining rt.Coerce\" goal — see\n\u003e [docs/v0.17/release-plan.md](docs/v0.17/release-plan.md).\n\nSky is a **fullstack functional language that compiles to typed Go**.\nYou write Elm-style syntax — explicit types, exhaustive pattern matching,\nno runtime exceptions — and ship a single static binary with a\nbatteries-included stdlib, observability built in, and any Go package\njust an `import` away.\n\n```elm\nmodule Main exposing (main)\n\nimport Std.Log exposing (println)\n\nmain =\n    println \"Hello from Sky!\"\n```\n\n```bash\nsky init hello \u0026\u0026 cd hello \u0026\u0026 sky run src/Main.sky\n```\n\n## Why Sky\n\n- **If it compiles, it works.** Every side effect returns\n  `Task Error a`; every fallible value returns `Result Error a`;\n  `sky check` invokes `go build` on the emitted Go so any shape\n  mismatch surfaces at type-check time. There is no runtime null,\n  no uncaught exception, no silent numeric coercion.\n- **One language, every shape.** The same `init / update / view /\n  subscriptions` source compiles to a server-rendered web app\n  (Sky.Live), a terminal UI (Sky.Tui), or a native desktop window\n  (Sky.Webview).\n- **Batteries included.** Auth, database, HTTP client + server,\n  WebSocket, JSON, JWT, CSV, email, encryption, observability —\n  every primitive a real app needs is in the stdlib (`Std.Db`,\n  `Std.Auth`, `Std.Ui`, `Std.Cache`, `Std.Email`, …) and\n  documented with `sky doc --serve`.\n- **Go's whole ecosystem.** `sky add github.com/some/package` —\n  the compiler introspects the Go package and generates strict,\n  typed Sky bindings. No hand-written FFI glue. Stripe SDK\n  (~76k FFI symbols) compiles and tree-shakes to a 4k-line\n  `main.go`.\n- **AI-friendly by design.** Explicit annotations, exhaustive\n  pattern matching, no implicit coercions, no exceptions. LLMs\n  generate code that compiles the first time. The shipped\n  `CLAUDE.md` and `sky init`'s starter `CLAUDE.md` give any\n  AI assistant the load-bearing context to scaffold production\n  apps directly.\n- **One binary out the back.** Every project compiles to a\n  static Go binary. Deploy with `scp`, with Docker, or as a CLI\n  you `brew install`.\n\n## Hello, Sky\n\nA counter web app — type-checked, server-driven, no JavaScript.\n\n```elm\nmodule Main exposing (main)\n\nimport Std.Cmd as Cmd\nimport Std.Live exposing (app, route)\nimport Std.Sub as Sub\nimport Std.Ui as Ui\nimport Std.Ui.Font as Font\n\n\ntype Msg\n    = Increment\n    | Decrement\n\n\ntype alias Model = { count : Int }\n\n\ninit : a -\u003e ( Model, Cmd Msg )\ninit _ = ( { count = 0 }, Cmd.none )\n\n\nupdate : Msg -\u003e Model -\u003e ( Model, Cmd Msg )\nupdate msg model =\n    case msg of\n        Increment -\u003e ( { model | count = model.count + 1 }, Cmd.none )\n        Decrement -\u003e ( { model | count = model.count - 1 }, Cmd.none )\n\n\nview : Model -\u003e Ui.Element Msg\nview model =\n    Ui.layout []\n        (Ui.row [ Ui.spacing 16, Ui.padding 24 ]\n            [ Ui.button [] { onPress = Just Decrement, label = Ui.text \"−\" }\n            , Ui.el [ Font.size 24 ] (Ui.text (String.fromInt model.count))\n            , Ui.button [] { onPress = Just Increment, label = Ui.text \"+\" }\n            ])\n\n\nmain =\n    app\n        { init = init\n        , update = update\n        , view = view\n        , subscriptions = \\_ -\u003e Sub.none\n        , routes = [ route \"/\" () ]\n        , notFound = ()\n        }\n```\n\n```bash\nsky run src/Main.sky    # http://localhost:8000\n```\n\nAdd `Std.Tui.app cfg` to ship the same `view` to a terminal\ncanvas, or `Std.Webview.app cfg` for a native desktop window.\n\n## Install\n\n```bash\n# macOS / Linux — single-binary install\ncurl -fsSL https://sky-lang.org/install | bash\n\n# or build from source (Haskell GHC 9.4+ required to build the compiler)\ngit clone https://github.com/anzellai/sky\ncd sky \u0026\u0026 cabal install --installdir=$HOME/.local/bin exe:sky\n```\n\nThe `sky` binary embeds the runtime, stdlib, and Sky Console.\nEnd users only need `sky` on PATH and Go 1.21+ available for\ncodegen.\n\n## Pick your shape\n\nMatch the application to the right surface — every shape uses the\nsame TEA-style `init / update / view / subscriptions`.\n\n| What you're building                    | Surface           | Entry point                | Default deployment   |\n|-----------------------------------------|-------------------|----------------------------|----------------------|\n| Web app (server-driven, real-time)      | **Sky.Live**      | `Std.Live.app cfg`         | Cloud Run / VM       |\n| HTTP / JSON API (no UI)                 | **Sky.Http.Server** | `Server.listen 8000 [...]` | Cloud Run / VM     |\n| Terminal UI (TUI)                       | **Sky.Tui**       | `Std.Tui.app cfg`          | `brew install` / CLI |\n| CLI tool (no UI loop)                   | **Sky.Cli**       | `main = Task.run ...`      | `brew install`       |\n| Native desktop app                      | **Sky.Webview**   | `Std.Webview.app cfg`      | `.app` / `.exe`      |\n\nEvery backend shares `Std.Ui` for layout, `Std.Auth` for sessions,\n`Std.Db` for persistence, `Std.Log` / `Std.Trace` for\nobservability, and `Sky.Core.*` for pure primitives.\n\n## What ships with Sky\n\nA short tour. Full reference at `sky doc --serve` or\n[docs/stdlib.md](docs/stdlib.md).\n\n| Module                 | What it gives you                                                                 |\n|------------------------|-----------------------------------------------------------------------------------|\n| `Std.Ui`               | Typed no-CSS layout DSL (`row`/`column`/`el`/`button`/`input` + `Background`/`Border`/`Font`/`Region` subs). Renders to inline-styled HTML, ANSI cells, or native Webview from the same source. |\n| `Std.Live`             | Sky.Live runtime — TEA app + SSE patches + session stores (memory / sqlite / redis / postgres / firestore) + routing + cookies + auth gates. |\n| `Sky.Http.Server`      | HTTP server with typed routes, middleware (CORS / logging / rate-limit / basic-auth), streaming responses, WebSocket upgrade. |\n| `Std.Auth`             | bcrypt password hashing, HS256 / RS256 JWT, register / login / roles. Typed secrets — never `fmt.Sprintf(\"%v\", token)`. |\n| `Std.Db`               | SQLite + PostgreSQL via one interface. Connection pool, prepared statements, versioned migrations, `Db.RowDecoder`, `withTransaction`. |\n| `Std.Money` + `Std.Decimal` | Arbitrary-precision Decimal + currency-typed Money (50+ ISO 4217 codes + crypto) with `allocate` for fair splits and conversion rates. |\n| `Std.Cache`            | LRU + TTL in-memory cache, parametric on key + value, monotone stats. |\n| `Std.Email`            | Resend / SES / SendGrid / SMTP under one typed `EmailProvider`. `SKY_EMAIL_DRY_RUN=1` for tests. |\n| `Std.Compression` / `Std.Csv` / `Std.Config` | gzip / zstd; RFC 4180 CSV; TOML / YAML / JSON decoders that mirror `Sky.Core.Json.Decode`. |\n| `Sky.Core.WebSocket`   | Client + server bidirectional sockets. |\n| `Sky.Core.Crypto`      | SHA-256 / 512, HMAC, RSA sign/verify, AES-GCM, ChaCha20, scrypt password derivation, AEAD constants. |\n| `Std.Webview`          | Native desktop window (macOS in v0.1; Linux / Windows in v0.2). |\n\n## Observability — built in\n\nEvery Sky.Live and Sky.Http.Server app auto-mounts:\n\n- `/_sky/console` — Std.Ui dashboard with overview, logs,\n  metrics, traces, errors (production-gated via\n  `SKY_CONSOLE_AUTH`).\n- `/_sky/metrics` — Prometheus scrape endpoint\n  (`sky_live_requests_total{route,status}`, latency histograms,\n  drop counters).\n- `/_sky/healthz` / `/_sky/readyz` — liveness + readiness probes.\n- `/_sky/buildinfo` — commit, build timestamp, Sky version.\n\nRun **`sky console serve`** to stand up a central hub that\nmultiple Sky apps push telemetry to via the `HubExporter`\n(OTLP/HTTP). See [docs/v0.16.x-console/HUB.md](docs/v0.16.x-console/HUB.md)\nfor the multi-service dashboard, tenant isolation, and the\n3-layer auth defense-in-depth model.\n\n`OTEL_EXPORTER_OTLP_ENDPOINT` is honoured for the standard\nOpenTelemetry collector — point at Honeycomb, Grafana Tempo,\nDatadog, etc.\n\n## Going to production\n\n```toml\n# sky.toml\nname = \"myapp\"\nversion = \"1.0.0\"\nentry = \"src/Main.sky\"\n\n[live]\nport = 8000\nstore = \"sqlite\"          # memory / sqlite / redis / postgres / firestore\nstorePath = \"sessions.db\"\nttl = \"30m\"\n\n[database]\ndriver = \"sqlite\"         # sqlite / postgres\nurl = \"DATABASE_URL\"\n\n[auth]\ncookie = \"sky_sid\"\nttl = \"24h\"\n# tokenSecret read from SKY_AUTH_TOKEN_SECRET (never put secrets in sky.toml)\n\n[log]\nformat = \"json\"           # plain / json\nlevel  = \"info\"\n```\n\n```bash\nENV=production \\\nSKY_AUTH_TOKEN_SECRET=\"$(openssl rand -base64 48)\" \\\nSKY_CONSOLE_AUTH=app SKY_CONSOLE_TOKEN=\"$(openssl rand -base64 48)\" \\\nsky build src/Main.sky \u0026\u0026 ./sky-out/app\n```\n\nThe production gate is `ENV` (then `SKY_ENV` fallback). Unset\nor `dev` / `development` / `local` → dev mode. Anything else\nlocks down the dev console, banner, and metrics endpoint.\n\nDeploy with `scp` + your favourite supervisor, drop the binary\ninto a Docker `FROM scratch` image, or run it directly on any\nplatform with a Go 1.22+ runtime.\n\n## Documentation\n\n- **[Getting started](docs/getting-started.md)** — install + your\n  first app in 5 minutes.\n- **[Stdlib reference](docs/stdlib.md)** — every module, every\n  function, indexed by tier (Pure / Fallible-pure / Task /\n  Diverging).\n- **[Sky.Live](docs/skylive/overview.md)** — server-driven UI\n  + SSE patches + sessions + routing.\n- **[Std.Ui](docs/skyui/overview.md)** — typed no-CSS layout DSL.\n- **[Sky.Tui](docs/skytui/overview.md)** — terminal backend for\n  `Std.Ui`.\n- **[Sky.Webview](docs/skywebview/overview.md)** — native desktop\n  window.\n- **[Std.Auth](docs/skyauth/overview.md)** — sessions + JWT + roles.\n- **[Std.Db](docs/skydb/overview.md)** — SQLite + PostgreSQL.\n- **[`sky.toml`](docs/sky-toml.md)** — every config key.\n- **[CLI](docs/tooling/cli.md) / [LSP](docs/tooling/lsp.md) /\n  [Testing](docs/tooling/testing.md)**.\n- **[Known limitations](docs/KNOWN_LIMITATIONS.md)** —\n  current-version constraints + workarounds.\n- **[Compiler journey](docs/compiler/journey.md)** — how Sky got\n  here (historical context, kept for contributors).\n\n## Examples\n\n39 examples ship in [`examples/`](examples/). Each builds clean\nfrom a wiped slate (`rm -rf sky-out .skycache .skydeps \u0026\u0026 sky build`).\n\n| Range  | Category                              |\n|--------|---------------------------------------|\n| 01-08  | Hello / CLI / Go-FFI / file / system  |\n| 09-12  | Sky.Cli / Sky.Tui counters \u0026 TODOs    |\n| 13     | Stripe-SDK-scale FFI benchmark (76k symbols) |\n| 14-25  | Sky.Live + Sky.Http.Server apps       |\n| 26     | `examples/26-ui-showcase` — every Std.Ui primitive |\n| 29-31  | Sky.Webview + WebGL spike             |\n| 32-33  | SSE relay + WebSocket echo            |\n| 34-38  | Multi-tier + composite-test apps      |\n| 39     | Two Sky.Live apps → one hub (v0.16.6) |\n\n## Contributing\n\nIssues and PRs welcome at\n[github.com/anzellai/sky](https://github.com/anzellai/sky). The\n[compiler architecture](docs/compiler/architecture.md) write-up\nand [pipeline doc](docs/compiler/pipeline.md) are the right\nstarting points for compiler work. Run `cabal test` (cap with\n`timeout 3600`) before any PR; `scripts/example-sweep.sh`\nvalidates every example builds.\n\n## Licence\n\n[Apache 2.0](LICENSE) — © 2025–2026 Anzel Lai. Includes patent grant +\ntrademark clause. Prior-art attribution for derivative files (parts of\nthe type-inference core adapted from elm/compiler under BSD-3-Clause)\nlives in [NOTICE.md](NOTICE.md). Contributions accepted under the same\nApache 2.0 terms — see [CONTRIBUTING.md](CONTRIBUTING.md).\n\n\u003e Sky was previously distributed under the MIT licence (releases up to\n\u003e and including v0.10.0). Those releases remain available under their\n\u003e original MIT terms; v0.10.1 onwards ships under Apache 2.0.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanzellai%2Fsky","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanzellai%2Fsky","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanzellai%2Fsky/lists"}