Kronos

Getting Started

Learn how to install and run Kronos

Getting Started with Kronos

Welcome to Kronos! This guide will help you get up and running in minutes.

Kronos is currently in public beta (v0.4.5). We'd love your feedback!

Installation

Install Dependencies

# Install Xcode Command Line Tools (includes Clang)
xcode-select --install

# Install gperf via Homebrew
brew install gperf
sudo apt-get update
sudo apt-get install build-essential gperf
sudo pacman -S base-devel gperf

Option 1: WSL (Recommended)

Install WSL, then follow Ubuntu/Debian instructions:

wsl --install
# After restart, in WSL terminal:
sudo apt-get update
sudo apt-get install build-essential gperf

Option 2: MSYS2

  1. Install MSYS2
  2. Open MSYS2 UCRT64 terminal:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gperf make

Clone & Build

git clone https://github.com/nedanwr/kronos
cd kronos
make

The build process requires GCC or Clang and gperf for keyword hashing.

Windows users: Run these commands in WSL or MSYS2 terminal. The output will be kronos (WSL) or kronos.exe (MSYS2).

Verify Installation

./kronos --version

You should see something like:

Kronos 0.4.5

Windows (MSYS2): Use ./kronos.exe --version or add to PATH.

Your First Program

Create a file called hello.kr:

hello.kr
print "Hello, World!"

Run it:

./kronos hello.kr
Output
Hello, World!

Interactive REPL

Kronos includes a powerful REPL for experimenting with code:

./kronos
REPL Session
> 10 plus 20
30
> set name to "Kronos"
> print f"Hello, {name}!"
Hello, Kronos!

Pro tip: The REPL supports arrow keys for history, tab completion, and multi-line input!

Command-Line Options

OptionDescription
kronos script.krExecute a Kronos file
kronos -e "code"Execute code directly
kronos --versionShow version
kronos --helpShow all options

Examples:

# Execute code directly
./kronos -e "print 42"

# Chain multiple expressions
./kronos -e "set x to 10" -e "print x times 2"

Next Steps

On this page