“Write programs to work together.” — Doug McIlroy on UNIX Philosophy
For more up-to-date info, we recommend looking at kongue(5)
What is Kongue?
Kongue is the language of all Kreato Linux projects. It is a tree-walking interpreted DSL (Domain-Specific Language). It is inspired by YAML and sh among many other languages.
It started as a concept in early 2025, when kpkg started feeling the limits of the old sh-backed runFile format.
Kongue is designed to be simple and modular. It is used by Kreato Linux projects including kpkg and Jumpstart. Projects embed the interpreter and decide which functions, commands, and macros they provide. For example, kpkg’s runFile 3 format is based on Kongue but adds its own package lifecycle and build context.
Features of Kongue
Kongue currently supports:
- String, boolean, list, and object-style values
- Variable interpolation with
$nameand${name} - Objects and property access
- If/else statements and regular-expression matching
- For loops with
breakandcontinue - Custom functions and local variables
- Virtual or host-backed file operations, depending on the embedding project
- Hooks for command execution and project-specific macros
The language is still growing. Planned work includes while loops, math support, a generic standard library, and import/include support.
Why Kongue?
The older solutions were either too dependent on the external environment (sh) or did not provide enough structure (ini). Embedding Lua or Nimscript was costly and required hacks and external libraries. Kongue keeps the syntax small while allowing each project to provide the behavior it needs.
Browser limitations
The examples in these lessons run as JavaScript in your browser. They can print values and write to a virtual filesystem, but they cannot spawn processes, access your filesystem, or read your environment. Any exec command reports this limitation instead of running.
The browser runner also uses a Web Worker. This keeps a long-running example from freezing the page. The worker is stopped after a short timeout.
How the lessons work
This course starts with standalone Kongue. We will begin with values and output, then build up to conditions, loops, functions, files, and objects. At the end, we will look at how a project embeds Kongue and changes its behavior through hooks.
The code examples are interactive. Press Run to execute an example, or press Edit to change it first. The output appears below each block.
- 01 Your first Kongue program
- 02 Comments and output
- 03 Strings and variables
- 04 Lists
- 05 String manipulation
- 06 Objects
- 07 Conditions
- 08 For loops
- 09
continueandbreak - 10 Custom functions
- 11 Local and global variables
- 12 Writing virtual files
- 13
Why
execis different in the browser - 14 Entry points and embedding
- 15 A complete small script
