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.
Zelyra source files use explicit language constructs. The compiler checks implemented syntax and types; this does not eliminate runtime surprises:
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 language includes optional-value and result-related constructs. Static 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 v1.2.40
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
The `zelyra new` command creates files for the selected template. Review the generated project and keep credentials in your local environment configuration:
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
The generated MariaDB template starts with the application source in `main.zyl`. Add and import further source modules as needed.
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
The updater targets the installed CLI. Keep a backup of your project and review release notes before changing toolchain versions.
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
Checks and runs a Zelyra program with the selected runtime backend.
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 configured database services and follows the setup steps supported by the selected project.
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
Checks project source and static diagnostics, available Cargo and Docker Compose tools, the configured database schema without changing it, and whether the selected local web port is available. It does not check the Zelyra PATH entry or Docker daemon/socket permissions.
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://www.zelyra.eu/editors/package.json -o ~/.vscode/extensions/zelyra/package.json && \
curl -s https://www.zelyra.eu/editors/language-configuration.json -o ~/.vscode/extensions/zelyra/language-configuration.json && \
curl -s https://www.zelyra.eu/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://www.zelyra.eu/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://www.zelyra.eu/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://www.zelyra.eu/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://www.zelyra.eu/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://www.zelyra.eu/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://www.zelyra.eu/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://www.zelyra.eu/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://www.zelyra.eu/downloads/zelyra-completion.bash -o ~/.local/share/bash-completion/completions/zelyra
curl -s https://www.zelyra.eu/downloads/zelyra-completion.zsh -o ~/.zsh/completion/_zelyra
curl -s https://www.zelyra.eu/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:
CI can catch some issues before a change is merged. Its coverage depends on the configured commands and implemented checks.
CI can run compiler and formatting checks automatically. Which rules are checked depends on the commands used and what the current implementation supports.
CI runs in the environment configured for the workflow. Keep its dependencies aligned with the environment you plan to deploy.
Configure the checks you need for pull requests. A passing workflow reports only the checks that actually ran.
Never argue about tabs, spaces, or braces in code reviews again. `zelyra fmt` enforces deterministic formatting automatically.
Automated checks can reduce repeated manual work. Choose checks that match your project and review their results.
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 latest published stable Linux binary. Building Zelyra from source is not required for this workflow.
Runs the formatter and checker separately for each `.zyl` file. Checks cover only implemented language features.
Add runtime and integration tests using the tools in your application stack.
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 supported syntax one file at a time. `zelyra check` does not prove that an application is correct. 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"
Follow Docker’s Linux installation guidance for your distribution. Membership in the `docker` group grants effectively root-level control of the host.
Docker permission guidanceFor a new generated project, `zelyra setup` selects a free host port. It does not silently rewrite an existing `.env`; set `ZELYRA_DB_HOST_PORT` to a free port and retry. For a web-port conflict, use `ZELYRA_HOST_PORT`.
ZELYRA_DB_HOST_PORT=3307
Ensure function parameters are typed and return signatures declare `-> Type` with `{ ... }` braces.
fn greet(name: String) -> String { ... }