Install Nyra

Install the Nyra toolchain from a GitHub release tag, set up your environment, and run your first project on macOS, Linux, or Windows.

Repository: github.com/nyra-lang/nyra
Releases (tags): github.com/nyra-lang/nyra/releases

Public repository required for the one-line installer The repo must be public (or you must be logged in) to download release assets and to use the curl | sh installer. Private repos require manual download from the Releases page while signed in, or building from source.

1. Requirements (all platforms)

ToolWhy
clangLinks your .ny programs with the Nyra C runtime
tarExtract release archives (macOS/Linux)

clang install hints

OSInstall
macOSxcode-select --install (Command Line Tools)
Linux (Debian/Ubuntu)sudo apt update && sudo apt install clang
Linux (Fedora)sudo dnf install clang
Windows (native)LLVM for Windows — add clang to PATH, or use WSL2 (recommended in §6)

Cross-compilation toolchains (optional)

To build for another OS (e.g. release a Windows .exe from macOS), install a cross linker/sysroot in addition to clang:

GoalTypical setup
macOS → Linuxbrew install messense/macos-cross-toolchains/aarch64-unknown-linux-gnu (or x86_64 variant)
macOS / Linux → WindowsMinGW-w64 + clang (brew install mingw-w64 on macOS)
→ macOS from Linux/Windowsosxcross + Apple SDK (advanced)
→ WasmHomebrew llvm (Apple clang lacks wasm32-wasi)

Then: nyra build . --release --for windows. See Compilation targets.

2. Pick a release tag

  1. Open Releases.
  2. Choose a version (e.g. v0.0.1).
  3. Under Assets, download the file that matches your CPU and OS (see table).
Your machineRelease asset
Mac, Apple Silicon (M1/M2/M3)nyra-aarch64-darwin.tar.gz
Mac, Intelnyra-x86_64-darwin.tar.gz
Linux, 64-bit Intel/AMDnyra-x86_64-linux.tar.gz
Linux, 64-bit ARM (e.g. Raspberry Pi 4/5, ARM cloud)nyra-aarch64-linux.tar.gz
Windows (native)No prebuilt yet — use Windows below

Optional: verify checksums using SHA256SUMS on the same release page.

3. Install layout

After extracting, you should have:

~/.nyra/          (recommended; or any folder you choose)
  bin/nyra
  share/stdlib/nyra_rt.c
  version           # e.g. 1.0.0

Set these environment variables (add to your shell profile so they persist):

export NYRA_HOME="$HOME/.nyra"
export PATH="$NYRA_HOME/bin:$PATH"

4. macOS

Option A — One-line installer (easiest)

Requires a public repo and curl:

curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh

Pin a specific tag:

curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh -s -- --version 1.0.0

Reload shell:

source ~/.zshrc    # or ~/.bashrc
nyra --version

Option B — Manual install from a release tag

  1. Download nyra-aarch64-darwin.tar.gz or nyra-x86_64-darwin.tar.gz from Releases.
  2. Extract:
mkdir -p ~/.nyra
tar -xzf ~/Downloads/nyra-aarch64-darwin.tar.gz -C ~/.nyra
  1. Add to ~/.zshrc (or ~/.bash_profile):
export NYRA_HOME="$HOME/.nyra"
export PATH="$NYRA_HOME/bin:$PATH"
  1. If macOS blocks the binary (killed on first run):
xattr -cr ~/.nyra/bin/nyra
  1. Verify:
source ~/.zshrc
nyra --version

5. Linux

Option A — One-line installer

curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh
# or pin version:
curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh -s -- --version 1.0.0
source ~/.bashrc   # or ~/.zshrc
nyra --version

Option B — Manual install from a release tag

  1. Install clang: sudo apt install clang (or your distro equivalent).
  2. Download nyra-x86_64-linux.tar.gz or nyra-aarch64-linux.tar.gz from Releases.
  3. Extract and configure:
mkdir -p ~/.nyra
tar -xzf ~/Downloads/nyra-x86_64-linux.tar.gz -C ~/.nyra
echo 'export NYRA_HOME="$HOME/.nyra"' >> ~/.bashrc
echo 'export PATH="$NYRA_HOME/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
nyra --version

6. Windows

Prebuilt Windows binaries ship on every release tag as nyra-x86_64-windows.zip.

Option A — PowerShell installer (recommended)

irm https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.ps1 | iex
# or pin version:
.\scripts\install.ps1 -Version 1.1.0
nyra --version

Requires clang (LLVM for Windows) on PATH to link .ny programs.

Option B — Manual zip from Releases

  1. Download nyra-x86_64-windows.zip from Releases.
  2. Extract to e.g. %USERPROFILE%\.nyra.
  3. Add %USERPROFILE%\.nyra\bin to PATH and set NYRA_HOME.
  4. Dot-source env.ps1 in the zip or open a new terminal after the installer updated user PATH.

Option C — WSL2 (Ubuntu)

  1. Install WSL2 and Ubuntu.
  2. Inside WSL, install clang: sudo apt install clang curl tar.
  3. Follow Linux (§5) — installer or manual tarball nyra-x86_64-linux.tar.gz.
  4. Create projects under your Linux home (e.g. ~/projects/myapp).

Alternative — Build from source (native Windows)

  1. Install Rust and clang (LLVM) on Windows.
  2. Clone the repo (same tag you want, e.g. v0.0.1):
git clone https://github.com/nyra-lang/nyra.git
cd nyra
git checkout v0.0.1
cargo build --release -p nyra-cli
  1. Use the built CLI and point runtime at the repo stdlib:
$env:PATH = "$PWD\target\release;$env:PATH"
$env:NYRA_HOME = "$PWD"
.\target\release\nyra.exe --version
  1. Run examples from the repo root:
.\target\release\nyra.exe run examples\syntax\hello.ny
Native Windows support is evolving; WSL2 matches the Linux release workflow today.

Install nyrapkg (package manager)

Dependency management uses the standalone nyrapkg tool (guide · github.com/nyra-lang/pkg), installed alongside nyra under ~/.nyra/bin/:

curl -fsSL https://raw.githubusercontent.com/nyra-lang/pkg/main/scripts/install.sh | sh
nyrapkg --version

From source: nyra build --release -o nyrapkg . in the pkg repo, then nyrapkg bootstrap.

7. First project (all platforms)

Once nyra --version works (e.g. nyra 0.0.1):

mkdir myapp
cd myapp
nyrapkg init

This creates:

Run it:

nyra run main.ny

Expected output:

Hello, world!
Multi-file projects For apps with import, run from the project root: nyra run . — see Modules and Getting started.

Other useful commands:

nyra check
nyra build
nyra build --release
nyra fmt --write main.ny

8. Upgrade to a newer tag

  1. Open Releases and pick a newer tag (e.g. v0.1.2).
  2. macOS/Linux: re-run the install script with --version, or download the new .tar.gz and extract over ~/.nyra.
  3. Confirm: nyra --version.

9. Build from source (contributors)

If you work on the compiler itself:

git clone https://github.com/nyra-lang/nyra.git
cd nyra
cargo build --release -p nyra-cli
export PATH="$PWD/target/release:$PATH"
nyra run examples/syntax/hello.ny

Or:

cargo install --path cli

Local iteration: ./scripts/dev-install.sh from the repo root.

10. Uninstall

rm -rf ~/.nyra

Remove the NYRA_HOME / PATH lines from ~/.zshrc, ~/.bashrc, or ~/.bash_profile.

11. Troubleshooting

ProblemFix
clang not foundInstall clang (see §1)
release asset not foundTag not published yet, wrong arch asset, or private repo without login
Runtime not foundSet export NYRA_HOME=~/.nyra and ensure share/stdlib/nyra_rt.c exists
zsh: killed (macOS)xattr -cr ~/.nyra/bin/nyra
Failed to read main.nyRun nyrapkg init first, or create main.ny
404 on raw.githubusercontent.comRepo is private — use Releases download or make repo public

Quick reference

StepCommand
Latest install (mac/Linux, public repo)curl -fsSL https://raw.githubusercontent.com/nyra-lang/nyra/main/scripts/install.sh | sh
Pin version... | sh -s -- --version 1.0.0
Package managercurl -fsSL https://raw.githubusercontent.com/nyra-lang/pkg/main/scripts/install.sh | sh
New projectnyrapkg init && nyra run .
Releases pagegithub.com/nyra-lang/nyra/releases

Canonical source: install.md in the repository.