Install & Quickstart
Download prebuilt Windows, Linux, and macOS installers, or build nyx yourself from source and connect AI hosts with nyx-connect.
Download Prebuilt Release (v0.1.0)
Pick your platform below to download the installer GUI (nyx-setup / .dmg) or portable .zip archive directly. Every bundle includes all six side-by-side executables (nyx, nyx-worker, nyx-script-worker, nyx-mcp, nyx-connect, and nyx-uninstall) with self-contained HDF5 storage — no external C HDF5 library, solver runtime, or Python installation required.
If Windows SmartScreen blocks the installer GUI:
- Double-click
nyx-setup-0.1.0-x86_64-pc-windows-msvc.exe. - On the "Windows protected your PC" dialog, click More info.
- Click Run anyway to launch the installer GUI.
- (Optional) Verify GitHub build provenance first in PowerShell:
gh attestation verify nyx-setup-0.1.0-x86_64-pc-windows-msvc.exe --repo p-j-r/nyx(or checkGet-FileHashagainstSHA256SUMS.txt).
Or extract the portable .zip without admin rights, or run an unattended PowerShell install:
.\nyx-setup-0.1.0-x86_64-pc-windows-msvc.exe install --user --yes
nyx-setup doctor
nyx --batch examples\15_soi_wire.nyx.json
If your desktop refuses to launch the downloaded installer:
- Browsers save binaries without execute permission. Open Properties → Permissions in your file manager and enable Allow executing file as program, or run
chmod +x nyx-setup-0.1.0-x86_64-unknown-linux-gnubefore launching it. - (Optional) Verify provenance first:
gh attestation verify nyx-setup-0.1.0-x86_64-unknown-linux-gnu --repo p-j-r/nyxorsha256sum -c SHA256SUMS.txt.
chmod +x nyx-setup-0.1.0-x86_64-unknown-linux-gnu
./nyx-setup-0.1.0-x86_64-unknown-linux-gnu install --user --yes
nyx-setup doctor
nyx --batch examples/15_soi_wire.nyx.json
GUI install & what to do when macOS Gatekeeper blocks launch:
- Open the
.dmgand dragNyx.appinto Applications, then openSet Up CLI & AI Hosts.appif you want the CLI tools onPATHand AI host registration. - Because the bundles are ad-hoc signed rather than Apple-notarised, macOS Gatekeeper may block first launch ("Apple could not verify Nyx"). Open System Settings → Privacy & Security, scroll down to Security, click Open Anyway next to
Nyx.app, and confirm — or remove the quarantine attribute viaxattr -dr com.apple.quarantine /Applications/Nyx.app. - (Optional) Verify GitHub build provenance first:
gh attestation verify nyx-0.1.0-aarch64-apple-darwin.dmg --repo p-j-r/nyx.
# Mount .dmg (use x86_64-apple-darwin.dmg on Intel Macs), install Nyx.app, and wire CLI
hdiutil attach nyx-0.1.0-aarch64-apple-darwin.dmg
cp -R "/Volumes/nyx 0.1.0/Nyx.app" /Applications/
xattr -dr com.apple.quarantine /Applications/Nyx.app
"/Volumes/nyx 0.1.0/Set Up CLI & AI Hosts.app/Contents/MacOS/nyx-setup" install --user --yes --from-app /Applications/Nyx.app
hdiutil detach "/Volumes/nyx 0.1.0"
nyx-setup doctor
Building Yourself with Cargo (Rust 1.99.1)
The toolchain is pinned via rust-toolchain.toml. Always build in --release mode. Default CPU builds compile zero GPU or C dependencies; pass --features gpu to enable opt-in wgpu / WGSL compute shaders for FDTD and DGTD.
git clone https://github.com/p-j-r/nyx.git && cd nyx
cargo build --release -p nyx -p nyx-script -p nyx-mcp -p nyx-connect
cargo run --release -p nyx
# Optional: enable opt-in wgpu/WGSL GPU compute shaders
cargo build --release --features gpu -p nyx
# Full test suite & clippy (optional):
cargo test --release --workspace
cargo clippy --release --workspace --all-targets --no-deps -- -D warnings
AI Host Setup via nyx-connect
nyx-mcp exposes four script-session tools (script_run, script_wait, script_check, and api) over stdio. Register it automatically in Antigravity, Claude Code, Claude Desktop, Cursor, VS Code, or Windsurf using nyx-connect (or the desktop Connect menu):
nyx-connect list
nyx-connect connect <app|all>
nyx-connect test
nyx-connect snippet
nyx-connect disconnect <app|all>
Managing Installed Bundles (nyx-setup)
On Windows and Linux, the self-extracting nyx-setup installer also acts as a lifecycle manager once installed:
nyx-setup install --user --yes # current-user install, PATH & file associations
nyx-setup install --prefix /opt/nyx --cli -y # custom prefix without GUI wizard
nyx-setup status --json # machine-readable install_report.v1 status
nyx-setup doctor # verify binary layout, PATH, and MCP links
nyx-setup uninstall --purge-cache # removes binaries & temp cache; preserves Documents/nyxHeadless Batch & Script CLI
Every installed or source-built nyx executable runs deterministic headless jobs using the same engine as the desktop UI:
nyx --batch model.nyx.json [--physics ems,sms]
nyx check script.nys [--json]
nyx run script.nys [--workspace DIR] [--seconds 120] [--memory 4096] [--calls 500]
nyx api list
nyx api show figure
nyx queue submit WORKSPACE PROJECT.nyx.json ems --priority 1
When running scripts (nyx run FILE.nys), all file I/O is confined strictly to --workspace (or the script’s parent directory if omitted). On Windows, nyx opts out of OS power-throttling efficiency-core demotion (nyx_engine::process::opt_out_of_power_throttling) so background solves retain full performance-core clock speeds.
Latency & Timeout Guidance for MCP Sessions (docs/HOST_SETUP.md)
Experience from instrumented MCP sessions shows that over 90% of wall time in unoptimised sessions goes to model turns and tool timeouts rather than solving. nyx-mcp therefore enforces four protections:
- Bounded Blocking (
--max-wait): Calls never block longer than 90 s by default (--max-wait SECONDSin 1–900 s inside the host’sargsarray). If a host imposes a shorter timeout, set"args": ["--max-wait", "60"]. - Pre-emptible Waits & Progress Heartbeats: Sending
notifications/cancelled,ping, or a follow-upscript_waitinterrupts a blocked wait cleanly without killing the worker job, and_meta.progressTokenrequests receivenotifications/progressevery 5 s. - One
script_runper Task: Combine geometry construction,mesh_build,solve_run, reductions (result_info,analyse,confinement,probe), andprintinto a single script rather than issuing separate round-trips per command. - Inspect
costBefore Refining:mesh_buildreports predicted time and memory from local solve history, andconvergence_checksupportsdry_run = true,max_cells, andmax_secondsto reject unaffordable meshes before solving.