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 gperfsudo apt-get update
sudo apt-get install build-essential gperfsudo pacman -S base-devel gperfOption 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 gperfOption 2: MSYS2
- Install MSYS2
- Open MSYS2 UCRT64 terminal:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-gperf makeClone & Build
git clone https://github.com/nedanwr/kronos
cd kronos
makeThe 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 --versionYou should see something like:
Kronos 0.4.5Windows (MSYS2): Use ./kronos.exe --version or add to PATH.
Your First Program
Create a file called hello.kr:
print "Hello, World!"Run it:
./kronos hello.krHello, World!Interactive REPL
Kronos includes a powerful REPL for experimenting with code:
./kronos> 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
| Option | Description |
|---|---|
kronos script.kr | Execute a Kronos file |
kronos -e "code" | Execute code directly |
kronos --version | Show version |
kronos --help | Show all options |
Examples:
# Execute code directly
./kronos -e "print 42"
# Chain multiple expressions
./kronos -e "set x to 10" -e "print x times 2"