Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

NaijaScript runs on Linux, macOS, and Windows.

Linux/macOS

curl --proto '=https' --tlsv1.2 -LsSf https://raw.githubusercontent.com/xosnrdev/naijascript/master/scripts/install.sh | sh

Windows (PowerShell)

powershell -ExecutionPolicy ByPass -c "irm https://raw.githubusercontent.com/xosnrdev/naijascript/master/scripts/install.ps1 | iex"

These scripts download the latest stable release, install the naija interpreter, and add the install directory to your PATH. You may need to restart your terminal after installation.

Verify the install

naija --version

Expected output example:

naijascript 0.11.5

First program

Create hello.ns:

shout("Hello, World!")

Run it:

naija hello.ns

For help:

naija help

Web playground

Try NaijaScript in your browser: https://naijascript-playground.pages.dev

Development setup

  1. Clone the repository
git clone https://github.com/xosnrdev/naijascript.git
cd naijascript
  1. Ensure Rust tooling

Install Rust via rustup if you do not have it. The repository pins the toolchain in rust-toolchain.toml; rustup will select the required nightly toolchain automatically.

  1. Build the interpreter
cargo build --bin naija
  1. Run tests
cargo test

If you encounter any issues, feel free to open an issue on the GitHub repository.