Nox is a Python-like scripting language with its own parser, interpreter, bytecode compiler, and virtual machine.
- Python 3.12+ (if building/running from source)
- Windows or Linux
Choose one of two ways to use Nox: Standalone Executable (no Python required) or From Source.
Download the prebuilt binary (nox.exe on Windows, nox on Linux) and run it directly:
nox hello.noxNote: The standalone release contains only the Nox runtime. Libraries like
NoxDocsare installed separately.
-
Clone the repository and run setup:
git clone https://github.com/devnexe/nox cd nox python setup.pyThe setup script creates a
.venvand installs required dependencies. -
Activate the virtual environment:
- Windows (PowerShell):
.venv\Scripts\Activate.ps1 - Windows (CMD):
.venv\Scripts\Activate.bat - Linux:
source .venv/bin/activate
- Windows (PowerShell):
-
Run Nox via Python:
python -m nox hello.nox
Replace
noxwithpython -m noxif running from source without an active alias/binary.
-
Create a file named
hello.nox:name = input("What's your name? ") display("Hello, " + name) -
Execute the script:
nox hello.nox
-
Launch the REPL (Interactive Mode):
nox
Run a directory directly:
nox my_projectNox automatically looks for an entry point in this order: __main__.nox → main.nox → app.nox.
| Command | Description |
|---|---|
nox script.nox |
Execute a script |
nox |
Launch the REPL |
nox dump file.noxc |
Display bytecode instructions |
nox profile script.nox |
Profile script performance |
nox fmt script.nox |
Format script source code |
nox lint script.nox |
Run linter on script |
nox test |
Run test suite |
nox package list |
List installed packages |
nox package install |
Install dependencies from nox.toml |
nox package install <pkg> |
Install a specific package |
Create a nox.toml file in your project root:
[project]
name = "my-app"
version = "0.1.0"
[dependencies]
# NoxWeb = "devnexe-alt/NoxWeb"Install configured dependencies:
nox package installLibraries can expose custom CLI commands using a .nxinfo manifest:
name = NoxDocs
entry = main.nox
command = docsOnce installed, invoke the library command directly:
nox docsArguments passed after the command are available inside the script via the argv list:
if len(argv) > 0:
display(argv[0])
Nox automatically compiles scripts and caches bytecode alongside source files:
project/
├── app.nox
└── __noxcache__/
├── app.noxc
└── app.noxc.sha256
The cache is managed internally and does not require manual intervention.
Full documentation is distributed as the NoxDocs package.
-
Install the documentation package:
nox package install NoxDocs
(For compiled binaries,
NoxDocsmust be installed in the same directory as the executable). -
Launch the documentation server:
nox docs
-
Open http://127.0.0.1:8080 in your browser to access guides on:
- Getting Started & Syntax
- Types & Functions
- Control Flow
- Standard Library & NoxWeb
📦 Official Nox libraries (NoxWeb, NoxDocs, etc.) are published at github.com/devnexe-alt.
Nox is under active development. The runtime utilizes both an AST interpreter and a bytecode Virtual Machine (VM). Advanced constructs may temporarily fall back to the AST interpreter.
Distributed under the MIT License. See LICENSE for details.