Start with a working program
The starter example has a clear task: greet a person with a typed string.
ZELYRA
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.
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()`.
The starter example has a clear task: greet a person with a typed string.
Replace the name, add a number, or switch to one of the presets below.
Run the code live with the real Zelyra compiler engine in your browser.
Edit the Zelyra code below and click »Run Code«. The code is compiled and executed in real-time by the Zelyra compiler engine.
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.
Every Zelyra file builds upon clear, unambiguous building blocks that eliminate surprises and enforce predictable runtime behavior:
fn
Declares reusable logic with typed inputs and return types.
var = ... / mutable
Immutable by default (`name = val`). Mutable only with explicit `mutable`.
struct
Groups typed fields together into clean domain structures.
Option / Result
The prototype includes optional-value and result-related constructs. Their checks cover supported cases only.
invariant
The compiler checks supported constructs; this is not a formal proof of application correctness.
fn main()
The starting point where execution begins when running a program.
Choose an installation route. Published release binaries currently target Linux x86_64 and Windows x86_64; macOS uses a source build.
No native release binary is published yet. Build from source with Rust and Cargo.
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
In an already cloned repository, rerun the installer after updating the source:
cd zelyra
git pull --ff-only
./install.sh
Test that the CLI toolchain is available in your PATH:
zelyra --version
zelyra doctor
Published release binary: Linux x86_64 (GNU). Other environments can use a source build.
curl -fsSL https://raw.githubusercontent.com/sf1976/zelyra/main/install.sh | bash -s -- --release v0.3.0
git clone https://github.com/sf1976/zelyra.git
cd zelyra
./install.sh
Verify that `zelyra` is accessible in your PATH and run system diagnostics:
zelyra --version
zelyra doctor
Native PowerShell script or WSL2 Linux environment.
Open PowerShell (no admin rights required) and run:
irm https://raw.githubusercontent.com/sf1976/zelyra/main/install.ps1 | iex
Clone repository and run install.ps1 directly:
git clone https://github.com/sf1976/zelyra.git
cd zelyra
.\install.ps1
zelyra --version
zelyra doctor
The generated MariaDB template includes MariaDB and a Zelyra web service. It does not add Nginx.
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
docker compose exec app zelyra --version
docker compose exec app zelyra run examples/fibonacci.zyl
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:
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
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.
Durable configuration: project metadata, capabilities, feature gates (`[features] web = true`), and security rules (`[security] host_allowlist = ["localhost"]`).
The generated MariaDB template contains German and English JSON locale files.
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:
chmod 600 .env
stat -c '%a %n' .env
git check-ignore -v .env
Preconfigured MariaDB database and volume storage. Start instantly with `zelyra setup --all` or `docker compose -f docker-compose.mariadb.yml up -d`.
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.
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
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
Yes! Your `.zyl` files, `zelyra.toml`, and `.env` files live exclusively in your project folder. `zelyra update` only updates the compiler binary.
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.
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.
Zelyra provides official syntax packages, TextMate grammars, and major modes for 8+ development environments. Every card contains direct installation and usage instructions:
code --install-extension zelyra.vsix
Settings → TextMate Bundles → (+) Ordner wählen
~/.config/helix/languages.toml
(require 'zelyra-mode)
Sprachen → Eigene Sprache definieren → Import
Packages/User/zelyra.sublime-syntax
~/.config/nvim/syntax/zelyra.vim
include "~/.nano/zelyra.nanorc"
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
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
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
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
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
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)
Import the official XML syntax definition into Notepad++ in 3 quick steps:
zelyra-notepadplusplus.xml via the button above.# 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
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
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
Enable instant command and file autocompletion for the Zelyra CLI toolchain in your favorite terminal shell:
curl -s https://demo.siedelmann.com/downloads/zelyra-completion.bash -o ~/.local/share/bash-completion/completions/zelyra
curl -s https://demo.siedelmann.com/downloads/zelyra-completion.zsh -o ~/.zsh/completion/_zelyra
curl -s https://demo.siedelmann.com/downloads/zelyra-completion.fish -o ~/.config/fish/completions/zelyra.fish
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.
Continuous Integration is not just a tool for large enterprises—it protects solo developers and teams from stressful bugs:
Typo or forgotten return value? CI detects and rejects errors immediately before any customer or colleague ever sees them.
CI can run compiler and formatting checks automatically. Which rules are checked depends on the commands used and what the current implementation supports.
Locally installed leftovers can hide bugs. CI builds in a pristine, reproducible environment identical to your production deployment.
Reviewing Pull Requests becomes trivial. GitHub displays a green checkmark if all types and tests pass, or pinpoints the exact line of failure.
Never argue about tabs, spaces, or braces in code reviews again. `zelyra fmt` enforces deterministic formatting automatically.
Tests and invariant proofs run in parallel in the cloud while you focus on writing your next feature.
When you push code or open a pull request, GitHub Actions executes this deterministic verification sequence:
Triggered on push to `main`/`master` or whenever a developer opens or updates a Pull Request.
Installs the published v0.3.0 Linux binary. Building Zelyra from source is not required for this workflow.
Runs the v0.3.0 formatter and checker separately for each `.zyl` file. Checks cover only implemented language features.
Add tests from your application stack separately. Zelyra v0.3.0 has no built-in `zelyra test` command.
Setting up CI takes less than 60 seconds. Follow these three steps in your local Git repository:
Create the directory `.github/workflows/` and add `zelyra-ci.yml` (or download the preconfigured template below).
.github/workflows/zelyra-ci.yml
Commit the workflow file and push it to your GitHub repository using Git:
git push origin main
Open your repository on GitHub and click on the »Actions« tab to watch the build pipeline run in real-time.
.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.
Display the real-time build status directly in your GitHub project header:
[](https://github.com/DEIN-BENUTZERNAME/DEIN-REPO/actions)
If you encounter an issue during installation or execution, here are the most common solutions:
The binary directory (~/.local/bin) is not yet in your shell PATH variable.
export PATH="$HOME/.local/bin:$PATH"
Your Linux user account is not a member of the local `docker` user group.
sudo usermod -aG docker $USER && newgrp docker
Another database service is already running on port 3306. Change DB_PORT in `.env` to 3307.
DB_PORT=3307
Ensure function parameters are typed and return signatures declare `-> Type` with `{ ... }` braces.
fn greet(name: String) -> String { ... }