ZELYRA
ZELYRA / QUICK START & SETUP

Your first program.
In five minutes.

Try code in the browser, then install a published Linux or Windows x86_64 release. macOS currently requires a source build with Rust and Cargo; Docker is available for the project stack.

⏱ 5-Minute Hands-On ⚡ Beginner friendly 📦 4 Install Methods 🎨 8+ Code Editors Supported Zelyra v0.3.0
01 / THE IDEA

Three simple steps.
One verified result.

You do not need to memorize every keyword immediately. Notice the shape: a typed function receives arguments, computes a return value, and is executed from `main()`.

01 / EXPERIMENT

Start with a working program

The starter example has a clear task: greet a person with a typed string.

02 / MODIFY

Change one detail

Replace the name, add a number, or switch to one of the presets below.

03 / EXECUTE

See compiler feedback

Run the code live with the real Zelyra compiler engine in your browser.

02 / INTERACTIVE SANDBOX

Try it right now.
Zero setup required.

Edit the Zelyra code below and click »Run Code«. The code is compiled and executed in real-time by the Zelyra compiler engine.

FIRST EXPERIMENT

Change the name

Find `"World"` inside the code editor on the right and replace it with your own name, e.g. `"Zelyra Developer"`. Then press »Run Code«.

Keyboard Shortcut: Press Ctrl+Enter or Cmd+Enter to compile and run.

main.zyl UTF-8
Zelyra v0.3.0 Compiler Engine
Console Output:
✓ Ready. Click »Run Code«.
03 / STRUCTURE

The six core elements.
Readable. Explicit. Structured.

Every Zelyra file builds upon clear, unambiguous building blocks that eliminate surprises and enforce predictable runtime behavior:

fn

Functions

Declares reusable logic with typed inputs and return types.

var = ... / mutable

Variables

Immutable by default (`name = val`). Mutable only with explicit `mutable`.

struct

Data Structures

Groups typed fields together into clean domain structures.

Option / Result

Explicit optional values

The prototype includes optional-value and result-related constructs. Their checks cover supported cases only.

invariant

Formal Proofs

The compiler checks supported constructs; this is not a formal proof of application correctness.

fn main()

Entry Point

The starting point where execution begins when running a program.

04 / LOCAL INSTALLATION

Install on your computer.
Choose your operating system.

Choose an installation route. Published release binaries currently target Linux x86_64 and Windows x86_64; macOS uses a source build.

Installation on macOS

No native release binary is published yet. Build from source with Rust and Cargo.

Rust & Cargo
1
Option A: Build from source

Install stable Rust and Cargo first, then clone the repository and run the installer:

git clone https://github.com/sf1976/zelyra.git
cd zelyra
./install.sh
2
Option B: Rebuild an existing checkout

In an already cloned repository, rerun the installer after updating the source:

cd zelyra
git pull --ff-only
./install.sh
3
Verify Installation

Test that the CLI toolchain is available in your PATH:

zelyra --version
zelyra doctor

Installation on Linux

Published release binary: Linux x86_64 (GNU). Other environments can use a source build.

curl | bash
1
Option A: Quick Installation
curl -fsSL https://raw.githubusercontent.com/sf1976/zelyra/main/install.sh | bash -s -- --release v0.3.0
2
Option B: Git Clone
git clone https://github.com/sf1976/zelyra.git
cd zelyra
./install.sh
3
Verify installation & PATH

Verify that `zelyra` is accessible in your PATH and run system diagnostics:

zelyra --version
zelyra doctor
💡 PATH Configuration Tip: If `zelyra: command not found` appears, add `export PATH="$HOME/.local/bin:$PATH"` to your `~/.bashrc` or `~/.zshrc` and run `source ~/.bashrc`.

Installation on Windows (PowerShell & WSL2)

Native PowerShell script or WSL2 Linux environment.

Windows 10 / 11
1
PowerShell 1-Line Installer

Open PowerShell (no admin rights required) and run:

irm https://raw.githubusercontent.com/sf1976/zelyra/main/install.ps1 | iex
2
Or Clone via Git for Windows

Clone repository and run install.ps1 directly:

git clone https://github.com/sf1976/zelyra.git
cd zelyra
.\install.ps1
3
Verify in PowerShell
zelyra --version
zelyra doctor

Docker Desktop & Isolated Containers

The generated MariaDB template includes MariaDB and a Zelyra web service. It does not add Nginx.

Empfohlen für Datenbank-Apps
1
Clone and launch container stack

Starts the Zelyra app container and MariaDB with automatic port discovery:

git clone https://github.com/sf1976/zelyra.git
cd zelyra
docker compose -f docker-compose.mariadb.yml up -d --build
2
Run commands inside container
docker compose exec app zelyra --version
docker compose exec app zelyra run examples/fibonacci.zyl
05 / PROJECT & DIRECTORY STRUCTURE

The anatomy of a Zelyra project.
Standardized. Clean. Maintainable.

Every Zelyra project generated via `zelyra new` follows a strict, zero-overhead layout where source code, schema models, localized translation catalogs, environment secrets, and container configurations have predictable, secure places:

📁 Generated MariaDB template (0.3.0) Zelyra v0.3.0
mein-projekt/
├── main.zyl                  # Zelyra-Quelldatei
├── zelyra.toml               # Projektkonfiguration
├── .env                      # lokale Konfiguration
├── .env.example              # Beispiel ohne Geheimnisse
├── .gitignore                # Git-Ausschlüsse
├── Dockerfile
├── docker-compose.mariadb.yml
├── locales/
│   ├── de.json
│   └── en.json
└── machine-management-demo.sql
main.zyl Source Code

In the generated 0.3.0 MariaDB template, the application source is initially in `main.zyl`. Other source modules are not generated by this template.

zelyra.toml Manifest

Durable configuration: project metadata, capabilities, feature gates (`[features] web = true`), and security rules (`[security] host_allowlist = ["localhost"]`).

locales/*.json i18n

The generated MariaDB template contains German and English JSON locale files.

.env & .env.example Secrets & Security

The generated example uses variables such as `DATABASE_URL`, `MARIADB_PASSWORD`, and `ZELYRA_DB_HOST_PORT`. Keep real credentials in your local `.env`, never commit them, and check the generated files for the full list:

# 1. Restrict permissions (owner read/write only):
chmod 600 .env
# 2. Verify permissions (must return 600):
stat -c '%a %n' .env
# 3. Verify Git actively ignores the file:
git check-ignore -v .env
docker-compose.mariadb.yml Zero-Setup DB

Preconfigured MariaDB database and volume storage. Start instantly with `zelyra setup --all` or `docker compose -f docker-compose.mariadb.yml up -d`.

06 / UPDATES & MAINTENANCE

Keep your toolchain up to date.
Built-in 1-command updater.

The `zelyra update` command updates the installed CLI. Your generated application is a separate project directory; back it up and check release notes before changing compiler versions.

⚡ Method 1 (Recommended): 1-Command CLI Updater

Use the official built-in updater to check for new releases and upgrade your local binary in seconds:

# 1. Prüfen, ob eine neue Version verfügbar ist:
zelyra update --check

# 2. Automatisch auf die neueste Version aktualisieren:
zelyra update

# 3. Neue Version und Systemgesundheit verifizieren:
zelyra --version
zelyra doctor

🛠️ Method 2: Git Clone & Local Source Builds

If you installed Zelyra by cloning the repository, simply pull the latest branch and run the installer again:

cd zelyra && git pull origin main && ./install.sh
🛡️ Are project files safe?

Yes! Your `.zyl` files, `zelyra.toml`, and `.env` files live exclusively in your project folder. `zelyra update` only updates the compiler binary.

🩺 Zelyra Doctor Diagnostics

After an update, `zelyra doctor` validates the project source and schema, checks whether Cargo and Docker Compose are available, reads the configured database schema without changing it, and tests whether the selected local web port can be bound. It does not diagnose the installed Zelyra command’s PATH entry, Docker daemon/socket permissions, or executable file permissions.

07 / CLI CHEATSHEET

The essential commands.
At a single glance.

Here are the most frequently used Zelyra commands for creating, checking, running, and managing applications:

zelyra update

Checks and updates the Zelyra CLI toolchain automatically (`--check` for dry-run).

zelyra run main.zyl

Compiles and runs a Zelyra program directly.

zelyra check main.zyl

Performs rapid typechecking and invariant verification without running.

zelyra fmt main.zyl

Formats code deterministically, protecting SQL and HTML blocks.

zelyra new my-app --mariadb

Generates a fresh project with MariaDB and Docker Compose template.

zelyra setup --all

Starts database services and executes migrations automatically.

zelyra setup --web

Launches a browser-based setup assistant with token authentication.

zelyra db plan

Inspects database schema diffs and generates dry-run SQL plans.

zelyra doctor

Diagnoses toolchain, PATH variables, Docker rights, and ports.

08 / EDITOR & TOOLING

Official Syntax Highlighting.
For VS Code, Windsurf, JetBrains, Zed, Helix, Emacs, Notepad++ & Vim.

Zelyra provides official syntax packages, TextMate grammars, and major modes for 8+ development environments. Every card contains direct installation and usage instructions:

⚡
VS Code, Cursor & Windsurf Official VSIX Extension (1-Click)
How to use / Terminal:
code --install-extension zelyra.vsix
📄
JetBrains & Zed Universal .tmLanguage.json
How to use:
Settings → TextMate Bundles → (+) Ordner wählen
🌀
Helix Editor languages.toml Snippet
Configuration Path:
~/.config/helix/languages.toml
🔮
GNU Emacs & Doom zelyra-mode.el (Major Mode)
Emacs init.el:
(require 'zelyra-mode)
📝
Notepad++ userDefineLang_zelyra.xml
How to import:
Sprachen → Eigene Sprache definieren → Import
💎
Sublime Text zelyra.sublime-syntax
Target Folder:
Packages/User/zelyra.sublime-syntax
🟢
Neovim & Vim zelyra.vim (Syntax & Filetype)
Neovim syntax folder:
~/.config/nvim/syntax/zelyra.vim
🐧
GNU Nano (Linux/Terminal) zelyra.nanorc (.nanorc Syntax)
Nano config:
include "~/.nano/zelyra.nanorc"
1
Option A: 1-Click VSIX Installation (Recommended for VS Code, Cursor & Windsurf)

Download zelyra.vsix above and install it in 2 seconds via terminal or the VS Code Command Palette:

# VS Code CLI:
code --install-extension zelyra.vsix

# Cursor AI IDE:
cursor --install-extension zelyra.vsix

# Windsurf AI IDE:
windsurf --install-extension zelyra.vsix
2
Option B: One-Line Terminal Command (macOS & Linux)

Fetches all files directly and activates syntax highlighting for .zyl in Windsurf or VS Code:

mkdir -p ~/.vscode/extensions/zelyra/syntaxes && \
curl -s https://demo.siedelmann.com/editors/package.json -o ~/.vscode/extensions/zelyra/package.json && \
curl -s https://demo.siedelmann.com/editors/language-configuration.json -o ~/.vscode/extensions/zelyra/language-configuration.json && \
curl -s https://demo.siedelmann.com/editors/zelyra.tmLanguage.json -o ~/.vscode/extensions/zelyra/syntaxes/zelyra.tmLanguage.json
1
JetBrains IDEs (IntelliJ IDEA, PhpStorm, WebStorm, PyCharm, RustRover, CLion)

All JetBrains IDEs support TextMate bundles natively without requiring any external plugins:

mkdir -p ~/.config/JetBrains/TextMate/zelyra/syntaxes && \
curl -s https://demo.siedelmann.com/editors/zelyra.tmLanguage.json -o ~/.config/JetBrains/TextMate/zelyra/syntaxes/zelyra.tmLanguage.json
2
Zed Editor (macOS & Linux)

Download the universal grammar into your Zed grammars folder:

mkdir -p ~/.config/zed/grammars && \
curl -s https://demo.siedelmann.com/editors/zelyra.tmLanguage.json -o ~/.config/zed/grammars/zelyra.tmLanguage.json
1
Helix Editor Configuration (~/.config/helix/languages.toml)

Helix is a modern, fast modal terminal editor written in Rust. Append this language definition to your `languages.toml` file:

# Append to ~/.config/helix/languages.toml
mkdir -p ~/.config/helix
cat << 'EOF' >> ~/.config/helix/languages.toml

[[language]]
name = "zelyra"
scope = "source.zelyra"
injection-regex = "zelyra|zyl"
file-types = ["zyl", "zelyra"]
comment-token = "//"
block-comment-tokens = { start = "/*", end = "*/" }
indent = { tab-width = 4, unit = "    " }
roots = ["zelyra.toml", ".git"]

[language.auto-pairs]
'(' = ')'
'{' = '}'
'[' = ']'
'"' = '"'
'`' = '`'
EOF
1
GNU Emacs / Doom Emacs Mode Setup

Download `zelyra-mode.el` into your Emacs load-path (e.g. `~/.emacs.d/lisp/`) and add it to your `init.el`:

# 1. Download zelyra-mode.el
mkdir -p ~/.emacs.d/lisp
curl -s https://demo.siedelmann.com/editors/zelyra-mode.el -o ~/.emacs.d/lisp/zelyra-mode.el

# 2. Add to ~/.emacs.d/init.el:
(add-to-list 'load-path "~/.emacs.d/lisp/")
(require 'zelyra-mode)
1
Notepad++ User Defined Language (UDL)

Import the official XML syntax definition into Notepad++ in 3 quick steps:

  1. Download zelyra-notepadplusplus.xml via the button above.
  2. In Notepad++, open menu Language &rarr; User Defined Language &rarr; Define your language...
  3. Click Import... and choose the downloaded XML file.
  4. All `.zyl` files will now be automatically syntax highlighted with custom keyword themes!
1
Install Sublime Syntax file (macOS & Linux)
# Linux
mkdir -p ~/.config/sublime-text/Packages/User
curl -s https://demo.siedelmann.com/editors/zelyra.sublime-syntax -o ~/.config/sublime-text/Packages/User/zelyra.sublime-syntax

# macOS
mkdir -p ~/Library/Application\ Support/Sublime\ Text/Packages/User
curl -s https://demo.siedelmann.com/editors/zelyra.sublime-syntax -o ~/Library/Application\ Support/Sublime\ Text/Packages/User/zelyra.sublime-syntax
1
Neovim & Classic Vim
mkdir -p ~/.config/nvim/syntax ~/.config/nvim/ftdetect
curl -s https://demo.siedelmann.com/editors/zelyra.vim -o ~/.config/nvim/syntax/zelyra.vim
echo 'au BufRead,BufNewFile *.zyl setfiletype zelyra' > ~/.config/nvim/ftdetect/zelyra.vim
1
Nano Syntax Registration
mkdir -p ~/.nano && \
curl -s https://demo.siedelmann.com/editors/zelyra.nanorc -o ~/.nano/zelyra.nanorc && \
grep -qxF 'include "~/.nano/zelyra.nanorc"' ~/.nanorc 2>/dev/null || echo 'include "~/.nano/zelyra.nanorc"' >> ~/.nanorc
09 / CLI AUTO-COMPLETION

Tab completion for your shell.
Bash, Zsh & Fish support.

Enable instant command and file autocompletion for the Zelyra CLI toolchain in your favorite terminal shell:

🐚
Bash Completion zelyra-completion.bash
Installation command:
curl -s https://demo.siedelmann.com/downloads/zelyra-completion.bash -o ~/.local/share/bash-completion/completions/zelyra
⚡
Zsh Completion zelyra-completion.zsh
Installation command:
curl -s https://demo.siedelmann.com/downloads/zelyra-completion.zsh -o ~/.zsh/completion/_zelyra
🐟
Fish Completion zelyra-completion.fish
Installation command:
curl -s https://demo.siedelmann.com/downloads/zelyra-completion.fish -o ~/.config/fish/completions/zelyra.fish
10 / CONTINUOUS INTEGRATION & QUALITY ASSURANCE

Continuous Integration.
Automated Invariant Proofs & GitHub Actions.

Continuous Integration can run selected Zelyra checks automatically when code changes. It does not prove a project correct in general. This section introduces a basic workflow and how to adapt it to your project.

What are the real-world benefits? (Why every developer should use CI)

Continuous Integration is not just a tool for large enterprises—it protects solo developers and teams from stressful bugs:

🛡️ 1. Zero Broken Code in Production

Typo or forgotten return value? CI detects and rejects errors immediately before any customer or colleague ever sees them.

🧮 2. Invariant & Contract Proofs

CI can run compiler and formatting checks automatically. Which rules are checked depends on the commands used and what the current implementation supports.

💻 3. No More "Works on my machine!"

Locally installed leftovers can hide bugs. CI builds in a pristine, reproducible environment identical to your production deployment.

👥 4. Effortless Team Collaboration

Reviewing Pull Requests becomes trivial. GitHub displays a green checkmark if all types and tests pass, or pinpoints the exact line of failure.

📐 5. Automatic Formatting Standards

Never argue about tabs, spaces, or braces in code reviews again. `zelyra fmt` enforces deterministic formatting automatically.

⏱️ 6. Huge Time Savings

Tests and invariant proofs run in parallel in the cloud while you focus on writing your next feature.

How the GitHub Actions Pipeline Works (Step-by-Step)

When you push code or open a pull request, GitHub Actions executes this deterministic verification sequence:

PHASE 01 ⚡

Git Trigger Event

Triggered on push to `main`/`master` or whenever a developer opens or updates a Pull Request.

on: [push, pull_request]
PHASE 02 📦

Install the pinned CLI

Installs the published v0.3.0 Linux binary. Building Zelyra from source is not required for this workflow.

zelyra --version
PHASE 03 🔍

Check each source file

Runs the v0.3.0 formatter and checker separately for each `.zyl` file. Checks cover only implemented language features.

zelyra check <file.zyl>
PHASE 04 🧪

Application-specific tests

Add tests from your application stack separately. Zelyra v0.3.0 has no built-in `zelyra test` command.

your test runner
🚀 How to Set Up Continuous Integration in Your Project (3 Steps)

Setting up CI takes less than 60 seconds. Follow these three steps in your local Git repository:

SCHRITT 1 1. Create Workflow File

Create the directory `.github/workflows/` and add `zelyra-ci.yml` (or download the preconfigured template below).

.github/workflows/zelyra-ci.yml
SCHRITT 2 2. Commit and Push

Commit the workflow file and push it to your GitHub repository using Git:

git push origin main
SCHRITT 3 3. Inspect Live Actions

Open your repository on GitHub and click on the »Actions« tab to watch the build pipeline run in real-time.

✓ Green Checkmark on Success
💡 Can any developer use this? GitHub Actions may be used for CI, but quotas and billing depend on GitHub’s current plan and runner configuration. Check GitHub’s current documentation before relying on a specific allowance.
🚀
GitHub Actions Workflow Template .github/workflows/zelyra-ci.yml (Vollständig kommentierte Vorlage)
Direct download / Target location:
.github/workflows/zelyra-ci.yml
# .github/workflows/zelyra-ci.yml
# Checks Zelyra source with the published v0.3.0 compiler.
name: Zelyra CI

on:
  push:
    branches: [main, master]
  pull_request:
    branches: [main, master]

jobs:
  check:
    name: Check Zelyra v0.3.0 sources
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install published Zelyra v0.3.0
        shell: bash
        run: |
          git clone --depth 1 --branch v0.3.0 https://github.com/sf1976/zelyra.git "$RUNNER_TEMP/zelyra-source"
          "$RUNNER_TEMP/zelyra-source/install.sh" --release v0.3.0 --root "$RUNNER_TEMP/zelyra-install" --no-path
          echo "$RUNNER_TEMP/zelyra-install/bin" >> "$GITHUB_PATH"

      - name: Verify installed version
        run: zelyra --version

      - name: Format and check each Zelyra source file
        shell: bash
        run: |
          mapfile -d '' zelyra_files < <(find . -type f -name '*.zyl' -not -path './.git/*' -print0)
          if ((${#zelyra_files[@]} == 0)); then
            echo "No .zyl source files found."
            exit 1
          fi
          for file in "${zelyra_files[@]}"; do
            zelyra fmt --check "$file"
            zelyra check "$file"
          done

# Zelyra v0.3.0 has no built-in test runner; add application-specific tests separately.

This workflow checks formatting and the supported syntax one file at a time. `zelyra check` is not a proof that an application is correct, and v0.3.0 does not include a `zelyra test` command. Add runtime and integration tests using your application’s own test tools.

🏷️ Optional: Add CI Status Badge to your README.md

Display the real-time build status directly in your GitHub project header:

[![Zelyra CI](https://github.com/DEIN-BENUTZERNAME/DEIN-REPO/actions/workflows/zelyra-ci.yml/badge.svg)](https://github.com/DEIN-BENUTZERNAME/DEIN-REPO/actions)
11 / TROUBLESHOOTING

Common hurdles.
Instant solutions.

If you encounter an issue during installation or execution, here are the most common solutions:

1. `zelyra: command not found`

The binary directory (~/.local/bin) is not yet in your shell PATH variable.

export PATH="$HOME/.local/bin:$PATH"

2. Docker permission denied

Your Linux user account is not a member of the local `docker` user group.

sudo usermod -aG docker $USER && newgrp docker

3. Port collision (e.g. 3306 in use)

Another database service is already running on port 3306. Change DB_PORT in `.env` to 3307.

DB_PORT=3307

4. Syntax error on function definition

Ensure function parameters are typed and return signatures declare `-> Type` with `{ ... }` braces.

fn greet(name: String) -> String { ... }